History log of /external/skia/tools/viewer/Viewer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
483c772cfdd646fad3ae8aa187136191ae3babdc 20-Feb-2018 Ben Wagner <bungeman@google.com> Add nativeFonts flag to Viewer.

This moves DMFontMgr and several related files which are tightly related
to fonts into tools/fonts, moves some flags around to prevent
duplication, and adds the nativeFonts handling to Viewer.

Change-Id: Id1bdad708a6b74319ac5ac9adfe21025db4ca0b2
Reviewed-on: https://skia-review.googlesource.com/108904
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
2d18f41858382fff91688a6318bc39cb22233f7e 20-Feb-2018 Chris Dalton <csmartdalton@google.com> Resurrect pathfinder in viewer and rename to "bisect"

Bug: skia:
Change-Id: If8d2f46b8f27fefc3a0f983eb649654e0fb4afcb
Reviewed-on: https://skia-review.googlesource.com/108685
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
7d910d4a29242685dc141c59c276968055c90aa6 20-Feb-2018 Florin Malita <fmalita@chromium.org> Delete SkottieSlide2

Now superseded by the generic SlideDir.

TBR=

Change-Id: Ia9adfc54dcb86ebb0cd50d2e1f4739896279de8f
Reviewed-on: https://skia-review.googlesource.com/108503
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
cefc1b97405d7bad2c621987394fc2d0c6300887 20-Feb-2018 Florin Malita <fmalita@chromium.org> Pass Viewer touch events to slides

Change-Id: Ia7b097c22e497e4e84be45108ac9796d89305ef3
Reviewed-on: https://skia-review.googlesource.com/108363
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
76a076bbdfe3e3837ff9e422d94124991062f583 16-Feb-2018 Florin Malita <fmalita@chromium.org> Generic "directory" viewer slide

This is a generalization of "skottie-dir", based on SkSG and operating
at the Slide API level.

For now it is only instantiated for Json slides, but could be used for
other slide "directories" in the future.

TBR=
NOTRY=true
Change-Id: If12429084bddeb172b234344f23eabcdadedcceb
Reviewed-on: https://skia-review.googlesource.com/108002
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
abdcc5f5b4c0a74d2fa5a27d7e9e114c48e45cab 12-Feb-2018 Ben Wagner <bungeman@google.com> Add text rendering related overrides to Viewer.

This combines the AAA and DAA settings into one Antialias setting which
also exposes alias and normal settings. It also fixes restoring the AAA
and DAA global state when not overriding.

This adds hinting, subpixel positioning, and subpixel rendering
tri-state toggles as well.

Change-Id: I845fa5be1fed4142e82796e6ef417b276fa76111
Reviewed-on: https://skia-review.googlesource.com/106761
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/tools/viewer/Viewer.cpp
8deb295ca7b2b9f6248fef7bb09bbae5df88011b 01-Feb-2018 Florin Malita <fmalita@chromium.org> Map Viewer mouse events to Slide space.

There isn't much Slide can do with Window-space mouse events.

Change-Id: I36509d4aa1b2ed510b8d8739d39cf5204ad486cc
Reviewed-on: https://skia-review.googlesource.com/102149
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
bdecacfbe47bc7211336bb847bb33c00ef85ea3e 03-Feb-2018 Brian Salomon <bsalomon@google.com> Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""""

This reverts commit 3a2cc2c2ec124de36d2544b2a523ef1dd317ca32.

Fix code with samplecnt=0 that slipped in between trybots/CQ and landing of previous version

Change-Id: Iab19f2e8d1e9901601c8c76244d7a88c5d707fab
Reviewed-on: https://skia-review.googlesource.com/103181
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
3a2cc2c2ec124de36d2544b2a523ef1dd317ca32 03-Feb-2018 Brian Salomon <bsalomon@google.com> Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""""

This reverts commit 5bb82cbecd740d21b92e8d2944280ab6eb6af7a6.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""
>
> This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75.
>
> Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types"
>
>
> Bug: skia:
> Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947
> Reviewed-on: https://skia-review.googlesource.com/102940
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/103220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
5bb82cbecd740d21b92e8d2944280ab6eb6af7a6 02-Feb-2018 Brian Salomon <bsalomon@google.com> Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""

This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75.

Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types"


Bug: skia:
Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947
Reviewed-on: https://skia-review.googlesource.com/102940
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
18c52a7b52211de5d0dcd86dc048adef758c6c75 02-Feb-2018 Brian Salomon <bsalomon@google.com> Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""

This reverts commit d0d7270fcc32546005b8e847df516cb11592cd30.

Revert "More sample count cleanup:"

This reverts commit d653cac70ed17983125ceed053138c09f1401846.

Revert "Add new GrContext queries for imagability, surfacability, and max sample count of color types"

This reverts commit 85ae7159c9c8a9186a4c7e74304eabb35bca9a79.


Need to understand NVPR perf changes before relanding

Change-Id: I0db075fb42438ef2a1f9885df184dce52892ac4b
Reviewed-on: https://skia-review.googlesource.com/102780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
d0d7270fcc32546005b8e847df516cb11592cd30 01-Feb-2018 Brian Salomon <bsalomon@google.com> Revert "Revert "Redefine the meaning of sample counts in GPU backend.""

Fixes gpu config default samples to be 1 and updates config parsing test accordingly.

This reverts commit c1ce2f7966babaae0deb150f93f1227ee5af9285.

Bug: skia:
Change-Id: I456973b1f52ced85a2011ea10fc49449bfc5846f
Reviewed-on: https://skia-review.googlesource.com/102147
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
c1ce2f7966babaae0deb150f93f1227ee5af9285 01-Feb-2018 Brian Salomon <bsalomon@google.com> Revert "Redefine the meaning of sample counts in GPU backend."

This reverts commit 48825b11ad25c98b9a4884d5cc0edd4e290c4409.

Reason for revert: nanobench

Original change's description:
> Redefine the meaning of sample counts in GPU backend.
>
> Old: 0 -> nonMSAA
> 1+ -> MSAA
>
> New:
> 0 -> error/unsupported
> 1 -> nonMSAA
> 2+ -> MSAA
>
> We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility:
>
> 1) SkSurface factories
> 2) GrBackendRenderTarget constructors
> 3) GrCaps::getSampleCnt()'s requestedCount parameter
>
> However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally.
>
> This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case.
>
>
> Bug: skia:
> Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33
> Reviewed-on: https://skia-review.googlesource.com/101560
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: Ic257619a8a5ee9ac15419ecf10259e42daed7f82
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/102662
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
48825b11ad25c98b9a4884d5cc0edd4e290c4409 01-Feb-2018 Brian Salomon <bsalomon@google.com> Redefine the meaning of sample counts in GPU backend.

Old: 0 -> nonMSAA
1+ -> MSAA

New:
0 -> error/unsupported
1 -> nonMSAA
2+ -> MSAA

We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility:

1) SkSurface factories
2) GrBackendRenderTarget constructors
3) GrCaps::getSampleCnt()'s requestedCount parameter

However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally.

This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case.


Bug: skia:
Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33
Reviewed-on: https://skia-review.googlesource.com/101560
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
0848fb0b3e3f465ec0de01ed7e0028cda32aa948 22-Jan-2018 Jim Van Verth <jvanverth@google.com> Fix startup for SampleSlide

When we start up Viewer with a SampleSlide as the first slide, nothing
gets rendered because SampleSlide depends on the backend being
initialized before setting its dimensions. This pushes the first slide's
initialization after the backend creation.

Change-Id: I8f83fe7b3973c40234104f1a83c0a60750694311
Reviewed-on: https://skia-review.googlesource.com/98161
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
/external/skia/tools/viewer/Viewer.cpp
87d18ced0a54c9ed836a82d4276a4f45b27a2943 22-Jan-2018 Jim Van Verth <jvanverth@google.com> Add Chinese zoom Sample.

Bug: skia:
Change-Id: Ibe5ffee64fe9fccd6b8d86c1310a78d2d51e424e
Reviewed-on: https://skia-review.googlesource.com/97065
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
ab99c34561f685159cff516caa54a5b31d2353d6 16-Jan-2018 Florin Malita <fmalita@chromium.org> Fix Viewer slide load on backend change - take 2

Split the slide switching logic (including load/unload) into
setCurrentSlide(), while keeping setupCurrentSlide() to deal with config
only.

Change-Id: I5bd2363ffd401c1b756217f845d4dbd16d6be5d6
Reviewed-on: https://skia-review.googlesource.com/94864
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
54f65c473fd6bf6919dfcbad22e924dff7586568 16-Jan-2018 Florin Malita <fmalita@chromium.org> Skotty -> Skottie

Change-Id: If8b6516024c69b0fc256208874f6666a4e70e12c
Reviewed-on: https://skia-review.googlesource.com/95241
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
3d1869453e90954f4b8b76d122e7795039dfb8c5 16-Jan-2018 Florin Malita <fmalita@google.com> Revert "Fix Viewer slide load on backend change"

This reverts commit 5fb009df3c87167762b33483ee82b5fe632837a9.

Reason for revert: Broke first slide.

Original change's description:
> Fix Viewer slide load on backend change
>
> Currently Viewer fires unbalanced load events on backend change.
>
> Instead of calling setupCurrentSlide() with an invalid prevSlide and
> always forcing a slide load, pass a |force| argument on backend change.
>
> Change-Id: I146b42331f5aa9721d4f407b81c13f4512d67d61
> Reviewed-on: https://skia-review.googlesource.com/94960
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

TBR=brianosman@google.com,fmalita@chromium.org

Change-Id: I52bbc9fb44f6ed4e04bcc549b2ec72c8600c823a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/94861
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
/external/skia/tools/viewer/Viewer.cpp
5fb009df3c87167762b33483ee82b5fe632837a9 16-Jan-2018 Florin Malita <fmalita@chromium.org> Fix Viewer slide load on backend change

Currently Viewer fires unbalanced load events on backend change.

Instead of calling setupCurrentSlide() with an invalid prevSlide and
always forcing a slide load, pass a |force| argument on backend change.

Change-Id: I146b42331f5aa9721d4f407b81c13f4512d67d61
Reviewed-on: https://skia-review.googlesource.com/94960
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
2985987cac72bf0a56fe75d751191d88d3b8582f 08-Jan-2018 Mike Reed <reed@google.com> add skotty-dir slide

Shows a directory of skotties in a grid

Bug: skia:
Change-Id: I96b0700d8809c94a394cf517222123967afb20dc
Reviewed-on: https://skia-review.googlesource.com/91407
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
88d99df31f4c181b926c61204abf61df9e4960b6 05-Jan-2018 Brian Salomon <bsalomon@google.com> [Viewer] Preserve gesture transformation matrix on slide/backend change

Change-Id: I417fb9b6d6b7c95884dff6871731883fe3736437
Reviewed-on: https://skia-review.googlesource.com/91460
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
094ccde2380bfbb615e25d0d80208148fcd47f17 30-Dec-2017 Florin Malita <fmalita@chromium.org> Initial Lottie loader impl (Skotty)

Coarse workflow:

* Construction

1) build a Json tree
2) collect asset IDs (for preComp/image layer resolution)
3) "attach" pass
- traverse the Json tree
- build an SkSG dom, one fragment at a time
- attach "animator" objects to the dom, for each animated prop
4) done, we can throw away the Json tree

* For each animation tick

1) iterate over active animators and poke their respective dom nodes/attributes
2) revalidate the SkSG dom
3) draw the SkSG dom

Note: post construction, things are super-simple - we just poke SkSG DOM attributes
with interpolated values, and everything else is handled by SkSG (invalidation,
revalidation, render).

Change-Id: I96a02be7eb4fb4cb3831f59bf2b3908ea190c0dd
Reviewed-on: https://skia-review.googlesource.com/89420
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
16c81a1ee9e2b90b97d73a1f08b03bebfadfbc81 20-Dec-2017 Brian Osman <brianosman@google.com> Avoid redrawing every time the mouse moves

Bug: skia:
Change-Id: Idc74e6c7e50f8d416d716ee666b37b52792c7c4b
Reviewed-on: https://skia-review.googlesource.com/87789
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
56a24813a4f905aa26cb90c7f835549677ac6975 19-Dec-2017 Brian Osman <brianosman@google.com> Move stats code to new layer (with configurable list of timers)

Bug: skia:
Change-Id: I3ca5c8c7047309983018339ec7b71b9aea5ee786
Reviewed-on: https://skia-review.googlesource.com/86921
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
040238bded7b932b916c84912cbaec1207aa29c0 18-Dec-2017 Chris Dalton <csmartdalton@google.com> Add a tools flag to suppress geometry shaders

Bug: skia:
Change-Id: I38736c5d49e3b281c2d23af3908575274ff97b5c
Reviewed-on: https://skia-review.googlesource.com/86282
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/tools/viewer/Viewer.cpp
f09e35eb59e43dedc329d3d15065b3e2735b7936 15-Dec-2017 Brian Osman <brianosman@google.com> Remove unnecessary includes from Viewer

Bug: skia:
Change-Id: I7b20db66a7eb5b549997fd4307e41937a8753921
Reviewed-on: https://skia-review.googlesource.com/86020
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
d67e5189802e89e74217244b36cc7263883d5dba 08-Dec-2017 Brian Osman <brianosman@google.com> Move ImGui support code to ImGuiLayer

Viewer still has plenty of code that uses ImGui to create application
specific UI, but the structural code that forwards input to ImGui, and
converts per-frame ImGui rendering data to Skia draw commands is now in
a single component that can be reused in any sk_app-based application.

Bug: skia:
Change-Id: Ic14ece659d4af8ee13b69c638bdaf7df6c24f5c0
Reviewed-on: https://skia-review.googlesource.com/82627
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
/external/skia/tools/viewer/Viewer.cpp
80fc07e8f854cd7c632bc06443d5f120ed002524 08-Dec-2017 Brian Osman <brianosman@google.com> Create a Window::Layer interface to reduce sk_app glue code

This also makes it possible to manage other parts of viewer, etc (like
the stats screen, command set, even samples) as additional layers in the
stack. For now, it just removes a lot of boilerplate.

Bug: skia:
Change-Id: Ic2f80690fc76c683b3736287dc2b738c50d38614
Reviewed-on: https://skia-review.googlesource.com/82688
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
c465d13e6fca5e171bde45d35b2dd43117f4702e 08-Dec-2017 Hal Canary <halcanary@google.com> resources: orgainize directory.

Should make it easier to ask just for images.

Change-Id: If821743dc924c4bfbc6b2b2d29b14affde7b3afd
Reviewed-on: https://skia-review.googlesource.com/82684
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
/external/skia/tools/viewer/Viewer.cpp
f06c3582677270c741a5e4fb366ec8b5d4ec4c21 07-Dec-2017 Brian Salomon <bsalomon@google.com> Remove instanced rendering

Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4
Reviewed-on: https://skia-review.googlesource.com/82241
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
3ac99cfaa2d434c71d9c82fc234fadd55fe96394 01-Dec-2017 Brian Osman <brianosman@google.com> Add 'Save to SKP' option to Viewer

Bug: skia:
Change-Id: Iea3794ce8710c84f2529b78b21655f2bf6aaa90e
Reviewed-on: https://skia-review.googlesource.com/79160
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
b2ba6644cfc311a12f30c99449ff1b76e0a22b69 22-Nov-2017 Yuqian Li <liyuqian@google.com> Add threaded backend to viewer

Bug: skia:
Change-Id: Ibf672921f8a05705e7262aad0b1f3f1e6fc0ef9c
Reviewed-on: https://skia-review.googlesource.com/75382
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/tools/viewer/Viewer.cpp
07b56b2f38b976ecf4c4f52c14973651d39ad63a 21-Nov-2017 Brian Osman <brianosman@google.com> Add XY to zoom window

Bug: skia:7332
Change-Id: I3a7d5cf20c75bb288d5aa0fa9046e77a669aad64
Reviewed-on: https://skia-review.googlesource.com/74560
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
eff04b5ec287e0fee0d44207c10d2d11f7eade8a 21-Nov-2017 Brian Osman <brianosman@google.com> Remove SampleApp and convert HelloWorld to sk_app

There is still a large amount of views code that could be trimmed down,
but which is used to implement samples (in viewer). Seemed simpler to
remove some of this code in pieces.

Bug: skia:
Change-Id: Ia3415060d03c8de604a154e3dc38379b754daab6
Reviewed-on: https://skia-review.googlesource.com/72801
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
fce09c5c72afb6aa45a201844ddeb8dae98f4c56 14-Nov-2017 Brian Osman <brianosman@google.com> Viewer: backspace jumps directly to the slide picker

Bug: skia:
Change-Id: I8107358e49ef20bf26ddf6a6dbb21efc07f167e7
Reviewed-on: https://skia-review.googlesource.com/71460
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/tools/viewer/Viewer.cpp
ead517d8229902e6232ddb052d74bb4f5279ed19 13-Nov-2017 Brian Osman <brianosman@google.com> Improve zoom window in Viewer

Made a more general mechanism for getting a canvas callback during GUI
rendering, clipped to a region. Use that to implement the zoom window.
The new version has better zoom control (I think), avoids bugs with
clamped image drawing stretching off-canvas, adds a highlight of the
pixel under the cursor, and also prints the RGBA values of that pixel.

Bug: skia:
Change-Id: I2c4da581648e7923c2a6fb28846dfdb52bdd3029
Reviewed-on: https://skia-review.googlesource.com/70723
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
98c5b8b4811fbda4f4e59c1c7b9b0b32d5cfe180 09-Nov-2017 Jim Van Verth <jvanverth@google.com> Move ms meter from the title bar to the display

Change-Id: I95dbb681a930f06103ecf1d8b213bb9c0915d2d6
Reviewed-on: https://skia-review.googlesource.com/69660
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/tools/viewer/Viewer.cpp
fdab576a75c636dbcd5ff44c3f5f57205cc26a6f 09-Nov-2017 Brian Osman <brianosman@google.com> Allow changing the transfer function in xform canvas mode

Used this to test out some theories for different color correction
approaches.

Bug: skia:
Change-Id: I072130733eaea736c9aa129af74887b028f035b4
Reviewed-on: https://skia-review.googlesource.com/69221
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
f479e42981f6572ec17b178aa95608eb5196eefa 08-Nov-2017 Brian Osman <brianosman@google.com> Use ListBox for slide picker in Viewer

Interaction is much nicer (the bulleted list of text had dead space
between entries, so mouse clicks could go unnoticed). This version also
keeps the currently active slide highlighted in the list, which is nice.

Bug: skia:
Change-Id: I609d90f3b1ff99765f0a7f1ca43e02a0a534dc4d
Reviewed-on: https://skia-review.googlesource.com/68780
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
70d2f43d82c32e0114789f20926b16b5bd86a445 08-Nov-2017 Brian Osman <brianosman@google.com> In Viewer, use a GL window for Raster mode

The GUI uses drawVertices, in a way that doesn't currently
work with the raster backend. Even if it worked, drawVertices
is fairly slow in raster mode, but extremely fast on GPU.
This makes the GUI always usable. The tradeoff is profiling
raster will be less accurate.

Bug: skia:
Change-Id: I69df777fc5be79f5bdd8d4505f6419bfa758c97e
Reviewed-on: https://skia-review.googlesource.com/68541
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
90dcce5e50a5a5368a094566f7b764409353aa4a 03-Nov-2017 Jim Van Verth <jvanverth@google.com> Add ms display to Viewer.

Change-Id: I6303209d3ff597611ac1a5f558294c6d6fcba670
Reviewed-on: https://skia-review.googlesource.com/67766
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
/external/skia/tools/viewer/Viewer.cpp
c9e7f9c44874f2013c032f798f9599e39809954f 02-Nov-2017 Jim Van Verth <jvanverth@google.com> Add sample mouse support to Viewer

Bug: skia:6830
Change-Id: I1a6bb781465a29cec4946462e234d63c48693454
Reviewed-on: https://skia-review.googlesource.com/66543
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
/external/skia/tools/viewer/Viewer.cpp
7a0ebfc033463907e2088401972d14ea8589cdb5 13-Oct-2017 Chris Dalton <csmartdalton@google.com> Add a tooling flag for path mask caching

Adds the flag and a disables caching on the CCPR bots.

Bug: skia:
Change-Id: Icb85e77f89634dda1d419dacac5b8a93340723f0
Reviewed-on: https://skia-review.googlesource.com/59740
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/tools/viewer/Viewer.cpp
195c05b6d5afbd65f803816938e24eebd51292c8 30-Aug-2017 Brian Osman <brianosman@google.com> Move several GrContextOptions fields behind GR_TEST_UTILS

Bug: skia:
Change-Id: I35bc08ad72fb94d8e47fe342d314c4496b954226
Reviewed-on: https://skia-review.googlesource.com/40881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
f9810666bd40db8fb1650e6c727c1a83b8090136 30-Aug-2017 Brian Osman <brianosman@google.com> Threaded generation of software paths

Re-land of: https://skia-review.googlesource.com/36560

All information needed by the thread is captured by the prepare
callback object, the lambda captures a pointer to that, and does the
mask render. Once it's done, it signals the semaphore (also owned by the
callback). The callback defers the semaphore wait even longer (into the
ASAP upload), so the odds of waiting for the thread are REALLY low.

Also did a bunch of cleanup along the way, and put in some trace markers
so we can monitor how well this is working.

Traces of a GM that includes GPU and SW path rendering (path-reverse):

Original:
https://screenshot.googleplex.com/f5BG3901tQg.png
Threaded, with wait in the callback (notice pre flush callback blocking):
https://screenshot.googleplex.com/htOSZFE2s04.png
Current version, with wait deferred to ASAP upload function:
https://screenshot.googleplex.com/GHjD0U3C34q.png
Bug: skia:
Change-Id: Idb92f385590749f41328a9aec65b2a93f4775079
Reviewed-on: https://skia-review.googlesource.com/40775
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
8b0f265f70703fa96c6d9011b1d8440e60d63632 29-Aug-2017 Brian Osman <brianosman@google.com> Always include the default path renderer in the chain

This (plus SW) ensures that we can always draw any path. Changed the path
renderer command line flags so that 'default' means everything but CCPR,
and 'All' really means 'every path renderer'.

Bug: skia:
Change-Id: I2801d1c50ab939f23efb4600e0f90e6add2891b7
Reviewed-on: https://skia-review.googlesource.com/40221
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
87ae9895692e4a97873a510178003d1ba70ab79a 24-Aug-2017 Brian Salomon <bsalomon@google.com> Revert "Threaded generation of software paths"

This reverts commit 76323bc0615044a5921afef0e19a350f3d04ffe0.

Reason for revert: Breaking NUC bots in threaded gm comparison:

https://chromium-swarm.appspot.com/task?id=382e589753187f10&refresh=10



Original change's description:
> Threaded generation of software paths
>
> All information needed by the thread is captured by the prepare
> callback object, the lambda captures a pointer to that, and does the
> mask render. Once it's done, it signals the semaphore (also owned by the
> callback). The callback defers the semaphore wait even longer (into the
> ASAP upload), so the odds of waiting for the thread are REALLY low.
>
> Also did a bunch of cleanup along the way, and put in some trace markers
> so we can monitor how well this is working.
>
> Traces of a GM that includes GPU and SW path rendering (path-reverse):
>
> Original:
> https://screenshot.googleplex.com/f5BG3901tQg.png
> Threaded, with wait in the callback (notice pre flush callback blocking):
> https://screenshot.googleplex.com/htOSZFE2s04.png
> Current version, with wait deferred to ASAP upload function:
> https://screenshot.googleplex.com/GHjD0U3C34q.png
>
> Bug: skia:
> Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790
> Reviewed-on: https://skia-review.googlesource.com/36560
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: Icac0918a3771859f671b69ae07ae0fedd3ebb3db
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/38560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
76323bc0615044a5921afef0e19a350f3d04ffe0 24-Aug-2017 Brian Osman <brianosman@google.com> Threaded generation of software paths

All information needed by the thread is captured by the prepare
callback object, the lambda captures a pointer to that, and does the
mask render. Once it's done, it signals the semaphore (also owned by the
callback). The callback defers the semaphore wait even longer (into the
ASAP upload), so the odds of waiting for the thread are REALLY low.

Also did a bunch of cleanup along the way, and put in some trace markers
so we can monitor how well this is working.

Traces of a GM that includes GPU and SW path rendering (path-reverse):

Original:
https://screenshot.googleplex.com/f5BG3901tQg.png
Threaded, with wait in the callback (notice pre flush callback blocking):
https://screenshot.googleplex.com/htOSZFE2s04.png
Current version, with wait deferred to ASAP upload function:
https://screenshot.googleplex.com/GHjD0U3C34q.png

Bug: skia:
Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790
Reviewed-on: https://skia-review.googlesource.com/36560
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
194db176c9c306c62771d3595d1e61d539fc949f 17-Aug-2017 Brian Salomon <bsalomon@google.com> Add ANGLE support to Viewer on Windows

Change-Id: I97a844b2f289d2518f60a64f94d60551c4530dd4
Reviewed-on: https://skia-review.googlesource.com/35742
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
399b3c2a01cb34c8b9e444ccb5fe5ef3153074c0 03-Aug-2017 Yuqian Li <liyuqian@google.com> Add AAA and DAA toggles to viewer

Bug: skia:
Change-Id: I0ee397d2b2c81a25918cb28be426cf5162da772f
Reviewed-on: https://skia-review.googlesource.com/30561
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/tools/viewer/Viewer.cpp
c722f79b6c8919e1a8a0df6d4d7735c5a8a1b5e8 31-Jul-2017 Mike Klein <mtklein@chromium.org> clang on windows support

1) Run python bin/fetch-clang-win
2) Set clang_win = "../bin/clang_win"
3) ???
4) Profit

Most changes here are to pass the right -mfoo flags to Clang
to enable advanced instruction sets, or fixed warning-as-errors.

BUG=skia:2679

Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921
Reviewed-on: https://skia-review.googlesource.com/28740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
d902042c7324d2d648ceedb242f96f4fdb8d04eb 25-Jul-2017 Yuqian Li <liyuqian@google.com> Fix viewer state that has empty state/option

If the value or option is empty (as was for kInstancedRenderingStateName),
our Android Java application will throw exception and skip the remaining
state objects. That would result in missing "Softkeys" and "FPS" for Raster
backend in Android Viewer app.

Bug: skia:
Change-Id: I6f600bbb94509ca5389eac2d681304a00427ecdb
Reviewed-on: https://skia-review.googlesource.com/26527
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/tools/viewer/Viewer.cpp
bc8150feef7aebb92811e8d976b65b04767c44f8 24-Jul-2017 Brian Osman <brianosman@google.com> Faster, thread-safe implementation

Bug: skia:
Change-Id: I401c5a9885c348aa424ab07b094acecddb209490
Reviewed-on: https://skia-review.googlesource.com/25860
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
53136aa93f0d0e72facabb70a7d40ed265e4be0e 20-Jul-2017 Brian Osman <brianosman@google.com> First stab at JSON event tracer

Not yet thread safe (so it forces threading off).
Builds JSON on the fly, so overhead is certainly bad.
Plan to fix all of that, but this at least "works".

There is now one tracing flag: 'trace'.
- 'debugf' installs the SkDebugf tracer.
- 'atrace' installs the Android ATrace tracer.
- Any other value is interpreted as a filename, and
produces a JSON file for chrome://tracing.

All three modes work in DM, nanobench, and Viewer.

Bug: skia:
Change-Id: I3fbc22382b99418a508c670be2770195c0a1c364
Reviewed-on: https://skia-review.googlesource.com/24781
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
1a325d25b941ef801b3e9b2c0342da43cf35cdba 14-Jul-2017 Chris Dalton <csmartdalton@google.com> Coverage counting path renderer

Initial implementation of a GPU path renderer that draws antialiased
paths by counting coverage in an offscreen buffer.

Initially disabled until it has had time to soak.

Bug: skia:
Change-Id: I003d8cfdf8dc62641581b5ea2dc4f0aa00108df6
Reviewed-on: https://skia-review.googlesource.com/21541
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/tools/viewer/Viewer.cpp
80a82dff82d11c229d33e87453e8510cbd1603b9 12-Jul-2017 Brian Osman <brianosman@google.com> On Windows, always re-create window for GL or Vulkan

On at least one machine, I've seen SetPixelFormat fail after Vulkan was
used to render to a window, preventing us from creating a GL context.
This is ham-fisted, but solves the problem.

Bug: skia:
Change-Id: I76d0cb26e181304846aa06109c1af768f8363a18
Reviewed-on: https://skia-review.googlesource.com/22740
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
2ac96dc82c45b4425c288dedbf3d35d70ac36928 23-Jun-2017 Brian Osman <brianosman@google.com> Hack to fix MSAA GL -> Vk transition on Windows Viewer

Bug: skia:
Change-Id: I49417789ab43734a1cbb4010281482970579971d
Reviewed-on: https://skia-review.googlesource.com/20505
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
b53f48cfec64830fa506267487a1037d27acb474 07-Jun-2017 Brian Osman <brianosman@google.com> Touch input support for Windows

Had to add some logic to avoid touch and mouse cross-talk, because
(at least on my laptop), the touch screen generates both kinds of
events.

This seems really useful [1] for the many [2] Skia developers with
touch-enabled Windows devices.

----------
1: No, not really.
2: N = 1?

Bug: skia:
Change-Id: Ib888bf4198f2cc0a29a31581ec4b64d3d9008c33
Reviewed-on: https://skia-review.googlesource.com/18920
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
42bb6acf56471e7308926e6b242fbbdd4103f306 05-Jun-2017 Brian Osman <brianosman@google.com> Simplify some Viewer code, and fix a few bugs

The content rect was always identical to the window rect,
so most of the related code did nothing. The translation
limit code is always useful (to avoid dragging the slide
way off-screen with the mouse), so always include it.
The auto-scaling to fit the screen is also still useful,
but just base it on the window rect.

The zoom code has four state variables, only used two of
them, and one was a trivially derived computation. Fold
most of that work into computeMatrix. (The translation
was always zero -- we never changed the zoom center.)

Include fDefaultMatrix in the matrix from computeMatrix,
rather than needing to apply it specially to the canvas.

Don't apply the inverse default matrix to touch or mouse
points. The absolute positions of those touch points is
not important, but because that matrix includes scale
(and sometimes very large or very small scale), it just
had the effect of greatly amplifying or damping the drag
speed. Without it, the slide always pans at the speed of
the touch/mouse drag -- which seems more desirable.

The use of the inverse default matrix was a clever trick,
but it caused the translation (applied to the global mtx)
to be scaled, so the slide was always pinned incorrectly.
Instead, supply the unmodified window rect and the default
matrix, so the trans limit code can do the obvious correct
thing: xform the slide bounds completely, then limit the
translation that will be applied after that. Slides are
now correctly pinned to screen edge regardless of how
much zoom is present in the default matrix.

Note: There are still several bugs related to all of this
code, but given the web of xform state, it's hard to
unravel. The touch gesture still doesn't know about
viewer's zoom, so that's ignored when doing the pinning.
Beyond that, it doesn't even know about window resize -
it only configures the translation limit when setting up
a slide. I had a fix for all of this (doing the
translation limiting in computeMatrix), but then the touch
gesture doesn't know about it, and can accumulate drag
motion that needs to be un-dragged to get back on-screen,
even though the slide is never really translated that far.

SkTouchGesture is in include. No one uses it except viewer:
TBR=bsalomon@google.com

Bug: skia:
Change-Id: I460cc07c3de6d36e63826f57d359faf1facf5ab3
Reviewed-on: https://skia-review.googlesource.com/18524
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
96789b31f2bca5e02f512cd273073b5707006990 26-May-2017 Brian Salomon <bsalomon@google.com> Fix resource and skp paths in Android viewer

Docs-Preview: https://skia.org/?cl=18037
Change-Id: If92e561c6c24de1f51f81477d89b927e10308f13
Reviewed-on: https://skia-review.googlesource.com/18037
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
175f588831c3d9f76349af8c27c64ceaa4460871 12-May-2017 Brian Salomon <bsalomon@google.com> Modify SkEventTracer::SetInstance to fail rather than assert if a tracer has already been installed.

Chromium usually calls SetInstance once per process. However, when run in single process more renderer threads will try to set the instance after the browser process already has done so. This allows them to fail gracefully without asserting.

Bug: skia:6603
Change-Id: Ic8a35422d787335aa67eefc07d0658f0fbe73db4
Reviewed-on: https://skia-review.googlesource.com/16664
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
e7705780c9450bb190abddc47a78b8b89784ed79 04-May-2017 Jim Van Verth <jvanverth@google.com> Add ShadowUtils sample.

Also enables mouse support in Viewer.

Change-Id: Iaed08d42a64f591f0cd9b24684b3aee43404ed94
Reviewed-on: https://skia-review.googlesource.com/15313
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
fbdc080d3cae3695544ffbc05c6ff6f5b4514c02 02-May-2017 Jim Van Verth <jvanverth@google.com> Add wireframe mode to Viewer.

Change-Id: I0ff11088465a4702acf9841a791d76f286ddbaf1
Reviewed-on: https://skia-review.googlesource.com/15147
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
0acd7954a9e654d7e9c11a532eeeeb2f18a76152 28-Apr-2017 Mike Reed <reed@google.com> add helper makeShader for the common Clamp case

Bug: skia:
Change-Id: I22cac56f35fed16daede0cf1b3e34dfa6f5ae3ea
Reviewed-on: https://skia-review.googlesource.com/14625
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/tools/viewer/Viewer.cpp
887cdf112809727c51890ba8b98b3ddce22249f0 03-Apr-2017 Mike Reed <reed@google.com> move vertex-mode enum into SkVertices

BUG=skia:6366

Change-Id: I3c0bf96cce6d32c9b8d12d16a772aaa6f18981aa
Reviewed-on: https://skia-review.googlesource.com/11062
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/tools/viewer/Viewer.cpp
830104632fd79eb5ac5bf8755a1c0271d13acb22 16-Mar-2017 Jim Van Verth <jvanverth@google.com> Rename GrAADistanceFieldPathRenderer to GrSmallPathRenderer

Also disables use of small distance fields in Android framework.

Change-Id: I1ba40ce85aa34d067608587e1fbe1d42e8a42868
Reviewed-on: https://skia-review.googlesource.com/9731
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
/external/skia/tools/viewer/Viewer.cpp
e0d4fbac00f240603e725b50d58d89048fd8b21f 15-Mar-2017 Brian Osman <brianosman@google.com> Viewer's nonlinear blend mode uses SkColorSpaceXformCanvas

Also avoid asserting when untagged images are being transformed.

BUG=skia:

Change-Id: If712f39b5f588b2bc3dc318a5b782badb7662ccf
Reviewed-on: https://skia-review.googlesource.com/9695
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
28b1252bab2915a028a3c9da3e8a64c89e3b8d9d 08-Mar-2017 Brian Osman <brianosman@google.com> Added MSAA selection to viewer GUI

On Windows, we need to reconstruct the window to allow setting a new
pixel format with a different sample count.

Added some code that maintains window size/position across these changes.
Previously, just cycling through backends would cause the window to move,
as the "default" position would cycle across the screen. Now it's pinned.

BUG=skia:

Change-Id: Iecbe7a490577382043ffe5a88c910b4c0be2ed5c
Reviewed-on: https://skia-review.googlesource.com/9085
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
41eac798f8ae5bb0fd3af3c16390d75501259f8d 08-Mar-2017 Brian Salomon <bsalomon@google.com> Add instanced rendering command line flag to viewer.

Previously this could only be turned on at runtime.

Change-Id: I1b626584fba17fcf8ff64135dd93f98c7f40821d
Reviewed-on: https://skia-review.googlesource.com/9445
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
99a339069cc55c45dc8d7dcd0b1c9ed04427ab4a 07-Mar-2017 Brian Salomon <bsalomon@google.com> Add viewer GUI options for desktop and Android to toggle instanced rendering.

BUG=skia:

Change-Id: I42674abfb7ee764f676100ac0e84cc0f07620bec
Reviewed-on: https://skia-review.googlesource.com/9396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
92004807f2dffea2d4a694e49434ce4c0bcfb28d 06-Mar-2017 Brian Osman <brianosman@google.com> Add legacy++ to viewer (sRGB w/nonlinear blending)

BUG=skia:6242

Change-Id: I696de8eac61aebaf5cb07d8874bde3c7bd470277
Reviewed-on: https://skia-review.googlesource.com/9299
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
42c456fd20bd45dd02f6d5eb0af7acf04341b1ee 06-Mar-2017 Brian Salomon <bsalomon@google.com> Remove PLS path renderer

Change-Id: Ib727b0749a5a7da95832970e79804417e8b6a247
Reviewed-on: https://skia-review.googlesource.com/9300
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
8a9de3d828a7bb042c31aa52a2338c70716a590a 01-Mar-2017 Brian Osman <brianosman@google.com> Add path renderer options to viewer GUI

BUG=skia:

Change-Id: I248ba081f0229d7fcf2071009076acc88b80b076
Reviewed-on: https://skia-review.googlesource.com/9088
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
621491e07eb66aee428db06173e27bbae7e9086a 28-Feb-2017 Brian Osman <brianosman@google.com> Add backend selection to viewer's GUI

BUG=skia:

Change-Id: I3314013538792c2aa82cc49f3f072aab2cdc4a55
Reviewed-on: https://skia-review.googlesource.com/9079
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
/external/skia/tools/viewer/Viewer.cpp
585dba831c83447861c1977c2e4896d65d449858 28-Feb-2017 Brian Osman <brianosman@google.com> Fix crash switching to Vulkan in viewer on Windows

BUG=skia:

Change-Id: I626aa6a1571311600a6208c42a8c3e9509d037de
Reviewed-on: https://skia-review.googlesource.com/9078
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
61cd31a5d3cacb13ff3bbc3ada7e25fa98c6810c 28-Feb-2017 csmartdalton <csmartdalton@google.com> viewer: Add a "Path renderer" dropdown menu

BUG=skia:

Change-Id: Ia3ed812d24f0f83631ab238bc418a3c95d49b9dc
Reviewed-on: https://skia-review.googlesource.com/9000
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/tools/viewer/Viewer.cpp
578f064a60b63ddfb00831e9e59a47060bfcefe0 25-Feb-2017 csmartdalton <csmartdalton@google.com> Add msaa flag and UI to viewer

BUG=skia:

Change-Id: I0a24d5e6a4271f84ea5c82eb6d9ede9a1e63f86a
Reviewed-on: https://skia-review.googlesource.com/8787
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/tools/viewer/Viewer.cpp
443ec1b794ec5ec8a155a9cdc641e95a95914533 24-Feb-2017 Christopher Dalton <csmartdalton@google.com> Add onBackendCreated callback to Viewer

Also removes fWidth and fHeight from Window and instead
calls into WindowContent to get these values.

BUG=skia:

Change-Id: I72ee506004b7da73db9abb607a3bc82edfcf7d43
Reviewed-on: https://skia-review.googlesource.com/8795
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
/external/skia/tools/viewer/Viewer.cpp
fd8f4d502d7c7e861de7b361c8e13aacfbc49fb2 24-Feb-2017 Brian Osman <brianosman@google.com> Fix some viewer crashes when switching color mode

The whole idea of immediate mode GUIs is to put your GUI code and the
resulting action close together. Unfortunately, for actions that tear
down the backend (possibly freeing the surfaces we're drawing to), we
can't do that. So defer that action until the next frame (really, the
next idle). Only required when an action might call setDisplayParams.

BUG=skia:

Change-Id: I3eb95fdb462526cb6d95819612ad2725c6f1050b
Reviewed-on: https://skia-review.googlesource.com/8953
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
a109e3926ed2fbbb41471a140b64297ea8554357 24-Feb-2017 Brian Osman <brianosman@google.com> ImGui color space controls

Adds radio buttons for switching among legacy, sRGB and F16.
Also adds a list of primaries you can pick from, as well as
a gamut diagram showing the primaries. The primaries can be
dragged around to alter the working space.

BUG=skia:

Change-Id: Ibd8c67dfe085594c0d7462f0efe4d79d73999919
Reviewed-on: https://skia-review.googlesource.com/8311
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
bf52e3df2987219783372d181ce1b5a7f32c77f8 22-Feb-2017 Brian Salomon <bsalomon@google.com> Viewer: balance save/restores and draw offscreen to window in src mode

Change-Id: I9a9bff1c950aaeda095ee49b4860c6fee04ea731
Reviewed-on: https://skia-review.googlesource.com/8887
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/tools/viewer/Viewer.cpp
008b9d80ab9adbf2656eceaf54d11cd15e4dda05 22-Feb-2017 csmartdalton <csmartdalton@google.com> Add the ability to enable/disable GPU path renderers

Adds a bitfield to GrContextOptions that masks out path renderers.
Adds commandline flags support to set this bitfield in tools apps.
Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same
thing in the context options.

BUG=skia:

Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f
Reviewed-on: https://skia-review.googlesource.com/8786
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/tools/viewer/Viewer.cpp
3661bc997620899695041010a750d11dbe8a972d 22-Feb-2017 Mike Reed <reed@google.com> hide trivial helpers on canvas

BUG=skia:

Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef
Reviewed-on: https://skia-review.googlesource.com/8852
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/tools/viewer/Viewer.cpp
6f449692c148c6b36d65c4bfa2941e3b09e25c38 14-Feb-2017 Jim Van Verth <jvanverth@google.com> Add more SampleApp support to viewer.

Fixes loading a Sample as first slide.
Adds char input.
Adds --slide and --list options.

Change-Id: I34b66818e3673fcfdc649443e7d9dfb74b478062
Reviewed-on: https://skia-review.googlesource.com/8445
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
/external/skia/tools/viewer/Viewer.cpp
f6877090114c002d02bef3804dbcd6be52b23cfc 13-Feb-2017 Brian Osman <brianosman@google.com> Pixel zoomer in viewer

Made it a separate ImGui window (rather than part of the debug window).
Bring it up with 'z'. Draggable/resizable. Variable zoom scale. Enjoy.

BUG=skia:

Change-Id: I949ab398126c892c8d353aaebcc8403765f42841
Reviewed-on: https://skia-review.googlesource.com/8357
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
29d871554b195206e35e2d5837d1073ddccc1b6b 10-Feb-2017 csmartdalton <csmartdalton@google.com> Enable threaded SkTaskGroup in Viewer

BUG=skia:

Change-Id: I7f467c094fb0bcb983bd86d07cb9bd7be34666b3
Reviewed-on: https://skia-review.googlesource.com/8332
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
79086b94eda7c46c37e1cf4395eb75ef54807e3c 10-Feb-2017 Brian Osman <brianosman@google.com> Integrate the ImGui library with viewer

Code and docs are at: https://github.com/ocornut/imgui

ImGui is an open source immediate mode GUI library that's
lightweight and fairly simply to integrate. Widget functions
return their state, and the library emits vertex and index
data to render everything. It's got a huge set of built-in
widgets and really robust layout control.

For the initial integration, I had to fix up event handling
in the viewer's app framework (to get mouse wheel and more
keys, etc...).

The new viewer 'Debug' window is toggled with the space bar.
For this change, I've added one feature to that window: the
slide picker. It's got a list of all slides, with filtering
support, and the ability to click to switch slides.

I also included the ImGui 'Demo' window (toggled with 'g').
This is nicely laid out, and includes examples of pretty
much everything the library can do. It also serves as good
documentation - find something that looks like what you want,
and then go look at the corresponding code (all of it is in
imgui_demo.cpp).

I have other CLs with other features (like directly editing
the primaries of the working color space), but I wanted to
land this chunk first, then start adding more features.

Other than adding new debugging features, there are few
more outstanding work items:

1) Raster doesn't render the GUI correctly, due to non-
invertible pos -> UV matrices. Florin is working on that.
2) Touch inputs aren't being routed yet, so the GUI isn't
usable on Android yet. Might also be tough to work with,
given the size.
3) ImGui has clipboard integration (that's why it wants
the C, X, and V keys), but we need to wire it up to the
OS' clipboard functions.
4) Draw commands can carry a void* payload to support
drawing images (using whatever mechanism the engine has).
I'd like to set that up (probably using SkImage*), which
makes it really easy to add visualization of off-screen
images in GMs, etc...

BUG=skia:

Change-Id: Iac2a63e37228d33141cb55b7e4d60bf11b7e9ae1
Reviewed-on: https://skia-review.googlesource.com/7702
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
1df161ab8a6aac3ca528fd5ffdecd08438889d97 09-Feb-2017 Brian Osman <brianosman@google.com> Improve viewer stats collection and display

Measure the time taken for animation and flush. Exclude UI and stats logic
from the timing. Use stacked bars to visualize the breakdown of time
within a frame.

BUG=skia:

Change-Id: I7ef84442a68147f02f65b6aa4452768fd3314de2
Reviewed-on: https://skia-review.googlesource.com/8227
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
462334ebc16beb2c223e806561440b2b0f86c236 09-Feb-2017 Brian Osman <brianosman@google.com> Fix viewer on Android

We need libandroid in all scenarios, not just vulkan.
Also, the logic for making an off-screen surface was
wrong - causing us to try and make one in legacy mode.

BUG=skia:

Change-Id: I5ef2e3e2d46de96e9824f6a12a13f6310ea04f81
Reviewed-on: https://skia-review.googlesource.com/8252
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/tools/viewer/Viewer.cpp
f750fbcb699fff2bdd264969515fc4045a1248be 08-Feb-2017 Brian Osman <brianosman@google.com> Simplify viewer's handling of backbuffer surface and color space

WindowContext still supports color spaces, but not other color
types. Any off-screen rendering is the app's responsibility.

This change also adds (working) F16 support to viewer. Note that
the previous 10-bit and FP16 support in WindowContext was broken.
There was no code to push the off-screen canvas to the window.
If you ever made it to the unreachable off-screen code path in
createSurface, it would have simply stopped drawing.

The decision to limit the window's gamut to sRGB is mostly driven
by my desire to add real-time editing of gamut. This design lets
us do that, without tearing down and rebuilding the window for
every change. An application could still supply a different gamut
via setDisplayParams and render directly to the back buffer with
proper color correction.

BUG=skia:

Change-Id: I94df35c7a42faee396009acc83683e40bb3c284d
Reviewed-on: https://skia-review.googlesource.com/8153
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
77a7a1b57c16c97f056c1e50c03bdc954947778c 07-Feb-2017 Matt Sarett <msarett@google.com> SkColorSpace: remove named API, add gamut API

Reland from: https://skia-review.googlesource.com/c/8021/

BUG=skia:

Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a
Reviewed-on: https://skia-review.googlesource.com/8136
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/tools/viewer/Viewer.cpp
1f2fff2544a9dc6a0f169a017d374eca9f04c6b5 07-Feb-2017 Matt Sarett <msarett@google.com> Revert "SkColorSpace: remove named API, add gamut API"

This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8.

Reason for revert: Breaks everything

Original change's description:
> SkColorSpace: remove named API, add gamut API
>
> BUG=skia:
>
> Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6
> Reviewed-on: https://skia-review.googlesource.com/8021
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

TBR=msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4
Reviewed-on: https://skia-review.googlesource.com/8127
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
/external/skia/tools/viewer/Viewer.cpp
ecaaf6f1c156e5690200322fc2636380c1f63dd8 06-Feb-2017 Matt Sarett <msarett@google.com> SkColorSpace: remove named API, add gamut API

BUG=skia:

Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6
Reviewed-on: https://skia-review.googlesource.com/8021
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/tools/viewer/Viewer.cpp
d63c10225c008cec541024fd9468a5faf2db1fbc 05-Jan-2017 Jim Van Verth <jvanverth@google.com> Minor fixes for the Linux viewer

BUG=skia:6091

Change-Id: Ia954c16610634e34f10bfe4273efc6677ca9563e
Reviewed-on: https://skia-review.googlesource.com/6618
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/tools/viewer/Viewer.cpp
9fcc743a5c82d6799ae8e5f37901810ee0b46ebf 29-Nov-2016 Greg Daniel <egdaniel@google.com> Add support for resources on android Viewer

BUG=skia:

Change-Id: I1acc3e4fe6d0ce8bf29c52dd7280dff029a3abc2
Reviewed-on: https://skia-review.googlesource.com/5322
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
/external/skia/tools/viewer/Viewer.cpp
bf111d7bc9ba3857433e30eae27f0272c34ed0fb 08-Nov-2016 Ben Wagner <bungeman@google.com> Move SkOSPath out of include/core.

It is moved to src/utils. It is almost a tool, but has two uses in
src/ports.

The existing SkOSFile.cpp is left empty for the time being since it is
mentioned in Chromium's BUILD.gn for Skia.

Change-Id: I3bb7f7c4214359eb6ab906bfe76737d20bf1d6c7
Reviewed-on: https://skia-review.googlesource.com/4536
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/tools/viewer/Viewer.cpp
145dbcd165d9d27298eb8888bc240e2d06a95464 03-Nov-2016 Ben Wagner <bungeman@google.com> Remove SkAutoTDelete.

Replace with std::unique_ptr.

Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176
Reviewed-on: https://skia-review.googlesource.com/4381
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/tools/viewer/Viewer.cpp
526972ecb5411b84ba2f5e20252f178f9ee2151f 24-Oct-2016 Brian Osman <brianosman@google.com> Rename all color space factories from New* to Make*

Matches our naming convention for all other types - factories that
return sk_sp (or any type that intelligently manages its own
lifetime) are named Make.

Previous factories are still around, assuming
SK_SUPPORT_LEGACY_COLOR_SPACE_FACTORIES is defined. Enable that
define for Android, etc.

See also: https://codereview.chromium.org/2442053002/

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3822

Change-Id: Iaea9376490736b494e8ffc820831f052bbe1478d
Reviewed-on: https://skia-review.googlesource.com/3822
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/tools/viewer/Viewer.cpp
2dd9693432b319c18a12c8a0deab5e1af5330e95 18-Oct-2016 Brian Osman <brianosman@google.com> GN builds viewer on Linux, too

BUG=skia:

Change-Id: Ia0c10db49905fc5a3bdf424c38576e1a6cf09ecf
Reviewed-on: https://skia-review.googlesource.com/3606
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/tools/viewer/Viewer.cpp
16adfa39330b7b1c6ac16b8127843e55f4233a29 18-Oct-2016 Brian Osman <brianosman@google.com> Viewer builds (for Windows) with GN

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3599

Change-Id: Id6a142f90f544bef266d78e385f22e17288d5064
Reviewed-on: https://skia-review.googlesource.com/3599
Reviewed-by: Mike Klein <mtklein@google.com>
/external/skia/tools/viewer/Viewer.cpp
285db44562da7136686e6d34a8443c6c6e0b942c 14-Oct-2016 Greg Daniel <egdaniel@google.com> Add support for Atrace and hook into SkEventTracer framework.

This change is a different version of:
https://skia-review.googlesource.com/c/3269/

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3345

Change-Id: I49d4f2987740d3ad1307f6aba3add0d63a46b22d
Reviewed-on: https://skia-review.googlesource.com/3345
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
/external/skia/tools/viewer/Viewer.cpp
8c67ebe4c48028635e7fe34542344e0ca7006b23 11-Aug-2016 jvanverth <jvanverth@google.com> Clean up Xlib viewer
* Make event handling closer to GLFW's
* Fix Vulkan refreshing

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226413002

Review-Url: https://codereview.chromium.org/2226413002
/external/skia/tools/viewer/Viewer.cpp
a489e3f1fb94554cfba03e9966df1cc37dd97f70 09-Aug-2016 jvanverth <jvanverth@google.com> Add RasterWindowContext_mac

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2228883003

Review-Url: https://codereview.chromium.org/2228883003
/external/skia/tools/viewer/Viewer.cpp
b8794ccea2163c780760b6e0f7ebd022f2c85d33 27-Jul-2016 jvanverth <jvanverth@google.com> Enable backend switching for Windows Viewer

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184163003

Review-Url: https://codereview.chromium.org/2184163003
/external/skia/tools/viewer/Viewer.cpp
6c471f75b28ba8c7127875277ae27799f57a3ddc 26-Jul-2016 bsalomon <bsalomon@google.com> Add sw support to viewer on Linux.

This doesn't yet do anything with srgb/colorspace.

Replaces the --vulkan flag with --backend which takes 'gl', 'vk', or 'sw'.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165813002

Review-Url: https://codereview.chromium.org/2165813002
/external/skia/tools/viewer/Viewer.cpp
e1d2007924e7c3ec6f349c326249ba5eb9a9d70c 12-Jul-2016 brianosman <brianosman@google.com> Respect --match for samples and jpgs in viewer

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2144643002

Review-Url: https://codereview.chromium.org/2144643002
/external/skia/tools/viewer/Viewer.cpp
2edb0f4a02fd1dbb8d6cb628b84048bcc875f72f 06-Jul-2016 liyuqian <liyuqian@google.com> More accurate render time and continuous fresh

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2129613002

Review-Url: https://codereview.chromium.org/2129613002
/external/skia/tools/viewer/Viewer.cpp
063ece71848fadc963cbac5c978cd48262138131 17-Jun-2016 jvanverth <jvanverth@google.com> Enable viewer in non-Vulkan builds

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2067023002

Committed: https://skia.googlesource.com/skia/+/746b792a9aad1230ab69158a51c49b2e5437d95b
Review-Url: https://codereview.chromium.org/2067023002
/external/skia/tools/viewer/Viewer.cpp
ed330c8755044822ec536ce8eb0a98a8627302bd 17-Jun-2016 liyuqian <liyuqian@google.com> Quickly fix the Compile Problem of Unused kkImageColorXformMetaData
TBR=msarett@google.com

I don't know why the compiler is complaining that since ImageSlide.cpp is still
using it.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2075873003

Review-Url: https://codereview.chromium.org/2075873003
/external/skia/tools/viewer/Viewer.cpp
74959a1471cd3b20e2dd79fc0c685e7205a25cd9 16-Jun-2016 liyuqian <liyuqian@google.com> Use Offscreen Surface for Split Screen

A dashed line is also added to split the screen. Currently, drawing
images with sRGB seems to still have bugs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069653002

Review-Url: https://codereview.chromium.org/2069653002
/external/skia/tools/viewer/Viewer.cpp
b109b8c5ec40a7dd85a0a2951a1f98fa63b805aa 16-Jun-2016 brianosman <brianosman@google.com> Lots of progress on switching to SkColorSpace rather than SkColorProfileType

Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002

Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170
Review-Url: https://codereview.chromium.org/2069173002
/external/skia/tools/viewer/Viewer.cpp
ab8241880d09eb1774b4993ca6df048a27b7020c 16-Jun-2016 brianosman <brianosman@google.com> Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (patchset #10 id:180001 of https://codereview.chromium.org/2069173002/ )

Reason for revert:
Mac crashes in GrUploadPixmapToTexture

Original issue's description:
> Lots of progress on switching to SkColorSpace rather than SkColorProfileType
>
> Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002
>
> Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170

TBR=reed@google.com,herb@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2072813002
/external/skia/tools/viewer/Viewer.cpp
6a61a875467646f8dbc37cfecf49e12d1f475170 16-Jun-2016 brianosman <brianosman@google.com> Lots of progress on switching to SkColorSpace rather than SkColorProfileType

Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002

Review-Url: https://codereview.chromium.org/2069173002
/external/skia/tools/viewer/Viewer.cpp
c7027ab03f2e8bab4c74bc1b047642622d3d682b 16-Jun-2016 jvanverth <jvanverth@google.com> Add samples to Viewer.

This adds support with animation, assuming the sample has
implemented onAnimate. Event handling has not been
implemented.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056343004

Committed: https://skia.googlesource.com/skia/+/76963e73704a42a18c29d6fbdcccb566e5c67658
Review-Url: https://codereview.chromium.org/2056343004
/external/skia/tools/viewer/Viewer.cpp
963632f686cd642344429f64e6a53262fe592828 15-Jun-2016 egdaniel <egdaniel@google.com> Revert of Enable viewer in non-Vulkan builds (patchset #2 id:20001 of https://codereview.chromium.org/2067023002/ )

Reason for revert:
breaking compile bots

Original issue's description:
> Enable viewer in non-Vulkan builds
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2067023002
>
> Committed: https://skia.googlesource.com/skia/+/746b792a9aad1230ab69158a51c49b2e5437d95b

TBR=djsollen@google.com,jvanverth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2072563002
/external/skia/tools/viewer/Viewer.cpp
746b792a9aad1230ab69158a51c49b2e5437d95b 15-Jun-2016 jvanverth <jvanverth@google.com> Enable viewer in non-Vulkan builds

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2067023002

Review-Url: https://codereview.chromium.org/2067023002
/external/skia/tools/viewer/Viewer.cpp
401cf48631acd9a24a542f9bd6b6bb1c16168070 13-Jun-2016 liyuqian <liyuqian@google.com> Quickly fix 0f to 0.0f
TBR=egdaniel@google.com

So Visual Studio won't complain.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2064863002

Review-Url: https://codereview.chromium.org/2064863002
/external/skia/tools/viewer/Viewer.cpp
d06693d9088f741c48a0b3b8449b3695447a86bc 13-Jun-2016 liyuqian <liyuqian@google.com> Quickly fix the double to SkScalar issue

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2060823004

Review-Url: https://codereview.chromium.org/2060823004
/external/skia/tools/viewer/Viewer.cpp
6f163d29438cefaaa10c5cd68e3b77c3cb9a6b79 13-Jun-2016 liyuqian <liyuqian@google.com> Display JPGs in Viewer with Split Screen and ColorSpaceXform

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2058753002

Review-Url: https://codereview.chromium.org/2058753002
/external/skia/tools/viewer/Viewer.cpp
f533f116e6324ee8592fbb49b8fca096c7fe926e 13-Jun-2016 egdaniel <egdaniel@google.com> Revert of Add samples to Viewer. (patchset #4 id:60001 of https://codereview.chromium.org/2056343004/ )

Reason for revert:
breaking on android compile

Original issue's description:
> Add samples to Viewer.
>
> This adds support with animation, assuming the sample has
> implemented onAnimate. Event handling has not been
> implemented.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056343004
>
> Committed: https://skia.googlesource.com/skia/+/76963e73704a42a18c29d6fbdcccb566e5c67658

TBR=bsalomon@google.com,jvanverth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2063883002
/external/skia/tools/viewer/Viewer.cpp
76963e73704a42a18c29d6fbdcccb566e5c67658 13-Jun-2016 jvanverth <jvanverth@google.com> Add samples to Viewer.

This adds support with animation, assuming the sample has
implemented onAnimate. Event handling has not been
implemented.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056343004

Review-Url: https://codereview.chromium.org/2056343004
/external/skia/tools/viewer/Viewer.cpp
71491dc14cff017e175ae5eb555490559de67914 09-Jun-2016 liyuqian <liyuqian@google.com> Support resize in Android Viewer App

Previously, we took out resize because Vulkan didn't support it in
Android. Now Android nyc-dev builds >= 2937079 and nyc-release builds >=
NRD66 supports it so we add it back.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050613003

Review-Url: https://codereview.chromium.org/2050613003
/external/skia/tools/viewer/Viewer.cpp
d94ad5823b7da7f115e997d12828314e290981f6 07-Jun-2016 liyuqian <liyuqian@google.com> Implement Raster Backend on Android Viewer App

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041193004

Review-Url: https://codereview.chromium.org/2041193004
/external/skia/tools/viewer/Viewer.cpp
1f508fd0fed5a91c0fccde8ba1c81a91e7fbe7d2 07-Jun-2016 liyuqian <liyuqian@google.com> Show FPS in UI state

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043793002

Review-Url: https://codereview.chromium.org/2043793002
/external/skia/tools/viewer/Viewer.cpp
814e38d5c11e4b71b2c87d1e1fe7bc8e8d688288 06-Jun-2016 jvanverth <jvanverth@google.com> Use intptr_t for onTouch argument.

On 64-bit platforms, casting int to void* is not valid.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2047443002

Review-Url: https://codereview.chromium.org/2047443002
/external/skia/tools/viewer/Viewer.cpp
b73c24b01a411843a98d4ccab7a39341d927e7fd 03-Jun-2016 liyuqian <liyuqian@google.com> Add Softkey UIState to Viewer

We can use this to simulate any key/command on Android UI.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035923002

Review-Url: https://codereview.chromium.org/2035923002
/external/skia/tools/viewer/Viewer.cpp
6cb70251829a467b146da9bc8925064f33608e48 02-Jun-2016 liyuqian <liyuqian@google.com> Implement OpenGL backend in Android viewer app

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2032623002

Review-Url: https://codereview.chromium.org/2032623002
/external/skia/tools/viewer/Viewer.cpp
1e305ba0d6a4237020d36234e9e286d3b0489401 01-Jun-2016 jvanverth <jvanverth@google.com> Add offset to memory allocations

This is setting up for suballocations within one large
allocation

BUG=skia:5031
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018933004
TBR=bsalomon@google.com

Review-Url: https://codereview.chromium.org/2018933004
/external/skia/tools/viewer/Viewer.cpp
e5a6cd9832eaa7011dee162283ff6470f82a3fdc 27-May-2016 liyuqian <liyuqian@google.com> Now we can use drawer to view the state information of the native app, and set its state using the spinner.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004633002

Committed: https://skia.googlesource.com/skia/+/4e4e30823fba0047b93a56bfcf05c04ca57e82ec

Review-Url: https://codereview.chromium.org/2004633002
/external/skia/tools/viewer/Viewer.cpp
85f758c33446eaccfadc12292fa5a0e71d7661b9 27-May-2016 jvanverth <jvanverth@google.com> Add OpenGL support to Linux viewer

Also adds a command line option (--vulkan) to choose between
Vulkan and OpenGL.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011473003

Committed: https://skia.googlesource.com/skia/+/10b3815a11c39b154ec7b74a2af43e019b50d48c

Review-Url: https://codereview.chromium.org/2011473003
/external/skia/tools/viewer/Viewer.cpp
9ad094933817800a2f700d261909000aca762fbe 27-May-2016 kjlubick <kjlubick@google.com> Revert of Add drawer with state information (patchset #8 id:140001 of https://codereview.chromium.org/2004633002/ )

Reason for revert:
Broke Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan. See https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan/builds/134/steps/compile_skia%20on%20Ubuntu/logs/stdio.

Original issue's description:
> Now we can use drawer to view the state information of the native app, and set its state using the spinner.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004633002
>
> Committed: https://skia.googlesource.com/skia/+/4e4e30823fba0047b93a56bfcf05c04ca57e82ec

TBR=djsollen@google.com,jvanverth@google.com,liyuqian@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2016343002
/external/skia/tools/viewer/Viewer.cpp
0248bfd8d25575cdfe6f45b74d5b485839b805a9 27-May-2016 kjlubick <kjlubick@google.com> Revert of Add OpenGL support to Linux viewer (patchset #5 id:80001 of https://codereview.chromium.org/2011473003/ )

Reason for revert:
Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan is broken and this patch prevents the revert of the culprit

Original issue's description:
> Add OpenGL support to Linux viewer
>
> Also adds a command line option (--vulkan) to choose between
> Vulkan and OpenGL.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011473003
>
> Committed: https://skia.googlesource.com/skia/+/10b3815a11c39b154ec7b74a2af43e019b50d48c

TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com,jvanverth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2015213002
/external/skia/tools/viewer/Viewer.cpp
10b3815a11c39b154ec7b74a2af43e019b50d48c 27-May-2016 jvanverth <jvanverth@google.com> Add OpenGL support to Linux viewer

Also adds a command line option (--vulkan) to choose between
Vulkan and OpenGL.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011473003

Review-Url: https://codereview.chromium.org/2011473003
/external/skia/tools/viewer/Viewer.cpp
4e4e30823fba0047b93a56bfcf05c04ca57e82ec 26-May-2016 liyuqian <liyuqian@google.com> Now we can use drawer to view the state information of the native app, and set its state using the spinner.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004633002

Review-Url: https://codereview.chromium.org/2004633002
/external/skia/tools/viewer/Viewer.cpp
beb1c67c9d332b41b306b292bb77a0e1566c32a8 20-May-2016 liyuqian <liyuqian@google.com> Use SkASSERTResult to avoid unused local variables

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2003653002

Review-Url: https://codereview.chromium.org/2003653002
/external/skia/tools/viewer/Viewer.cpp
e46e4f075bfa8acf038aa68a8e7da282d4c1015b 20-May-2016 liyuqian <liyuqian@google.com> Correct gesture scale and translation

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1996613002

Review-Url: https://codereview.chromium.org/1996613002
/external/skia/tools/viewer/Viewer.cpp
af236b5aa9e7d71d59bee6533d16deb76e9d098b 20-May-2016 jvanverth <jvanverth@google.com> Add OpenGL context to Viewer.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978573003

Committed: https://skia.googlesource.com/skia/+/56a11e4d6f3d436a3c2497c9c9e71a117d78a93f

Review-Url: https://codereview.chromium.org/1978573003
/external/skia/tools/viewer/Viewer.cpp
2884e9c0bd2cc9634a4b932d4142840c67227a78 18-May-2016 jvanverth <jvanverth@google.com> Revert of Add OpenGL context to Viewer. (patchset #7 id:120001 of https://codereview.chromium.org/1978573003/ )

Reason for revert:
sk_app/WindowContext.cpp is missing. Need to add file and resubmit.

Original issue's description:
> Add OpenGL context to Viewer.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978573003
>
> Committed: https://skia.googlesource.com/skia/+/56a11e4d6f3d436a3c2497c9c9e71a117d78a93f

TBR=brianosman@google.com,bsalomon@google.com,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/1990893002
/external/skia/tools/viewer/Viewer.cpp
d3cdbcad65673596ae37e65fec842d8d4d81c5a7 17-May-2016 liyuqian <liyuqian@google.com> Implement touch control

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1982643004

Review-Url: https://codereview.chromium.org/1982643004
/external/skia/tools/viewer/Viewer.cpp
56a11e4d6f3d436a3c2497c9c9e71a117d78a93f 17-May-2016 jvanverth <jvanverth@google.com> Add OpenGL context to Viewer.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978573003

Review-Url: https://codereview.chromium.org/1978573003
/external/skia/tools/viewer/Viewer.cpp
622c8d5de12f264e496e8d4664a2eea9333922d0 10-May-2016 brianosman <brianosman@google.com> Add flexible keybinding/command system to sk_app.

Viewer demonstrates use: Just create an instance of CommandSet,
register with the window, and add commands. Hopefully, we can keep
all commands in one place, and get some nice side-benefits. With
this framework, if you want to add a new command, you are only
required to add code in ONE place. And you get added to the help
screen, for free.

CommandSet automatically binds 'h' to cycle through the help modes.
(Functional grouping is most useful for general use, but the other
mode is nice to know what a key does, or to find an unused key for
a new feature).

Grouped by function: https://screenshot.googleplex.com/G5h3f52wFKu.png
Alphabetical by key: https://screenshot.googleplex.com/nZiopabLKJ6.png

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955293002

Review-Url: https://codereview.chromium.org/1955293002
/external/skia/tools/viewer/Viewer.cpp
05de216ffb864cb1f3a4fa37a2c3a772be38a0c9 06-May-2016 brianosman <brianosman@google.com> Add sRGB mode toggle to Viewer.

Unlike SampleApp, this just switches out the format of the window
surface (and then adjusts the gamma-correct flag on the SkSurfaces).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950983007

Review-Url: https://codereview.chromium.org/1950983007
/external/skia/tools/viewer/Viewer.cpp
a8d0d6c8bad00e713bc33e5f0d47ca4fec104433 05-May-2016 jvanverth <jvanverth@google.com> More refactoring for Viewer

* Move support files into sk_app and main files up to top directory
* Rename VulkanTestContext and create WindowContext parent class
* Place VulkanWindowContext et al. in sk_app namespace.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1944413005

Review-Url: https://codereview.chromium.org/1944413005
/external/skia/tools/viewer/Viewer.cpp