Commit Graph

254 Commits

Author SHA1 Message Date
Florin Malita
1022f74375 [skottie] Nested animation support
Extend composition layers to support referencing external .json
animations ("$"<PATH> syntax).

This is a custom extension (not supported in BM/Lottie).

Also make skottie::Animation ref-counted, to facilitate sharing.

TBR=

Change-Id: I062d031e5868d759f3930dea9b261f9b3ec81684
Reviewed-on: https://skia-review.googlesource.com/109806
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-23 19:15:26 +00:00
Florin Malita
83286a0df2 Don't consume mouse events in SkottieSlide
We want to togle inval display on click, but if we always consume the
event we disable pan/zoom in viewer.

TBR=

Change-Id: I1f785883252c4f4a09fd35d4a05485849bf7e8ef
Reviewed-on: https://skia-review.googlesource.com/109084
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-21 18:25:26 +00:00
Ben Wagner
483c772cfd 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>
2018-02-21 03:31:14 +00:00
Florin Malita
60d3bfcef5 [skottie] Show inval rects on mouse click in SkottieSlide
Also fix a SlideDir sizing bug.

TBR=

Change-Id: Iee61bb6665dc56ddd6fc062a686a9c0ef87dea92
Reviewed-on: https://skia-review.googlesource.com/108902
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-20 22:12:43 +00:00
Chris Dalton
2d18f41858 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>
2018-02-20 20:44:33 +00:00
Florin Malita
eb420457fd Add SkRect::contains(SkScalar x, SkScalar y)
Similar to its SkIRect counterpart.

Change-Id: I6872694d8602ed4181a1a15b4cd1c2c32aeab3f9
Reviewed-on: https://skia-review.googlesource.com/108506
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-20 17:57:53 +00:00
Florin Malita
97b3d2bcdb [sksg] Add 'plane' geometry node
SG geometry corresponding to SkCanvas::drawPaint().

TBR=

Change-Id: I3b368adda187fb92f524756496a3694c03a3113d
Reviewed-on: https://skia-review.googlesource.com/108562
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-20 17:08:53 +00:00
Florin Malita
836f822ec0 SlideDir focus tweaks
* cubic-map animation
 * shade the background scene when focused
 * unfocus on click outside focus rect

TBR=

Bug: skia:
Change-Id: I0ef8751b111b3b55c3fc36126c2ca1bc8ff6d33a
Reviewed-on: https://skia-review.googlesource.com/108501
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-20 15:51:33 +00:00
Florin Malita
7d910d4a29 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>
2018-02-20 15:50:13 +00:00
Florin Malita
cefc1b9740 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>
2018-02-20 14:54:13 +00:00
Florin Malita
65fce9edc4 SlideDir focus w/ animation
Add an animated "focus" mode for SlideDir.

Clicking a cell focuses.  SPACE unfocuses.

When a slide is focused, mouse and key events are passed through.

TBR=
Change-Id: Iec47e2327e3b21bd626846bb0d3f9107bf680b1b
Reviewed-on: https://skia-review.googlesource.com/108101
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2018-02-19 18:43:44 +00:00
Florin Malita
76a076bbdf 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>
2018-02-16 14:40:45 +00:00
Ben Wagner
abdcc5f5b4 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>
2018-02-12 22:38:43 +00:00
Florin Malita
c378fdcad8 [skottie] Fix viewer slide sizing on Android
TBR=

Change-Id: Ibbf4d22ba01e39b80c1f76d9af6bef647454996f
Reviewed-on: https://skia-review.googlesource.com/106160
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-09 16:40:41 +00:00
Florin Malita
8deb295ca7 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>
2018-02-05 15:53:26 +00:00
Brian Salomon
bdecacfbe4 Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""""
This reverts commit 3a2cc2c2ec.

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>
2018-02-03 01:59:59 +00:00
Brian Salomon
3a2cc2c2ec Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""""
This reverts commit 5bb82cbecd.

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 18c52a7b52.
> 
> 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>
2018-02-03 00:25:20 +00:00
Brian Salomon
5bb82cbecd Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""
This reverts commit 18c52a7b52.

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>
2018-02-02 23:37:59 +00:00
Brian Salomon
18c52a7b52 Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""
This reverts commit d0d7270fcc.

Revert "More sample count cleanup:"

This reverts commit d653cac70e.

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

This reverts commit 85ae7159c9.


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>
2018-02-02 12:19:52 +00:00
Brian Salomon
d0d7270fcc 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 c1ce2f7966.

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>
2018-02-01 21:15:39 +00:00
Brian Salomon
c1ce2f7966 Revert "Redefine the meaning of sample counts in GPU backend."
This reverts commit 48825b11ad.

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>
2018-02-01 18:34:40 +00:00
Brian Salomon
48825b11ad 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>
2018-02-01 18:16:58 +00:00
Florin Malita
22c528dcce [skottie] Convert SkottieSlide2 to SkSceneGraph animators.
Instead of dispatching ticks explicitly, bind Animations to the Scene
using ForwardingAnimator adaptors.

TBR=

Change-Id: I9faffed5c96157c781cc96729395b52d3f841e2b
Reviewed-on: https://skia-review.googlesource.com/102500
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-01 00:28:32 +00:00
Florin Malita
51012ce332 [sksg] Initial text support
Use the new node type for SkottieSlide2 labels.

TBR=

Change-Id: Icd6a4faf1c281bd83a2331c0072d1a6ed71acc09
Reviewed-on: https://skia-review.googlesource.com/102441
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-31 22:36:05 +00:00
Florin Malita
bcd07230eb [skottie] Convert (most of) SkottieSlide2 to SkSceneGraph
Each Skottie animation is now a transformed sksg node.

TBR=

Change-Id: Ib5c153e8279e1a74a242b0eb193c4463898b09ea
Reviewed-on: https://skia-review.googlesource.com/102201
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-31 19:15:45 +00:00
Jim Van Verth
0848fb0b3e 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>
2018-01-22 19:24:47 +00:00
Jim Van Verth
87d18ced0a 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>
2018-01-22 18:20:27 +00:00
Florin Malita
ab99c34561 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>
2018-01-17 14:19:46 +00:00
Florin Malita
54f65c473f 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>
2018-01-17 14:15:36 +00:00
Florin Malita
3d1869453e Revert "Fix Viewer slide load on backend change"
This reverts commit 5fb009df3c.

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>
2018-01-16 20:05:20 +00:00
Florin Malita
5fb009df3c 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>
2018-01-16 17:12:54 +00:00
Florin Malita
df2713c447 [skotty] Minor tools tweaks
* fix "show inval" persistency in SkottySlide
  * add frame-stamp to DM film strip

TBR=
Change-Id: I965b28fa25b4d6ddfa1ddf80f5f9187dff3f943c
Reviewed-on: https://skia-review.googlesource.com/92941
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-09 22:06:48 +00:00
Florin Malita
4932807824 [skotty,sksg] Initial image support
TBR=
Change-Id: Ib3c918b1d746e4f190ae05708681f2d5519afdb2
Reviewed-on: https://skia-review.googlesource.com/91980
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-08 18:11:31 +00:00
Mike Reed
2985987cac 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>
2018-01-08 13:44:49 +00:00
Brian Salomon
88d99df31f [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>
2018-01-05 18:18:39 +00:00
Florin Malita
aa4dc62139 [skotty] Clip/scale/center animations in Viewer
Animations have explicit bounds.  Updated Viewer to map the animation
to its full viewport.

TBR=
Change-Id: I5a016cace8ae97e9b4f0b93261fcfb4993ea2307
Reviewed-on: https://skia-review.googlesource.com/90263
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-02 21:25:16 +00:00
Florin Malita
094ccde238 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>
2017-12-30 22:55:39 +00:00
Brian Osman
16c81a1ee9 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>
2017-12-20 17:54:46 +00:00
Brian Osman
56a24813a4 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>
2017-12-20 16:59:04 +00:00
Chris Dalton
040238bded 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>
2017-12-19 17:26:56 +00:00
Brian Osman
f09e35eb59 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>
2017-12-15 20:09:29 +00:00
Brian Osman
d67e518980 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>
2017-12-11 17:37:58 +00:00
Brian Osman
80fc07e8f8 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>
2017-12-11 16:46:58 +00:00
Hal Canary
c465d13e6f 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>
2017-12-08 17:16:00 +00:00
Brian Salomon
f06c358267 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>
2017-12-08 13:41:10 +00:00
Brian Osman
6f3eac9b5d Fix sample modifier keys for mouse events
Bug: skia:
Change-Id: I0fc4f15abc44ff0a1b6b92e238e7abda35e7bacb
Reviewed-on: https://skia-review.googlesource.com/79904
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-05 14:05:31 +00:00
Brian Osman
3ac99cfaa2 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>
2017-12-01 17:05:29 +00:00
Brian Osman
ede860e91c Delete even more unused views code
Bug: skia:
Change-Id: I41480aa89dfcd8cb7e016e477cbabe354f35ce8a
Reviewed-on: https://skia-review.googlesource.com/75480
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-29 18:12:35 +00:00
Brian Osman
4f99e58252 Remove a huge pile of views code
All of this is dead when not using the old SkWindow framework.

TBR=reed@google.com

Bug: skia:
Change-Id: I0f6ab18987a98469bfd367d5bc10967300dfd3ca
Reviewed-on: https://skia-review.googlesource.com/75384
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-22 18:59:44 +00:00
Yuqian Li
b2ba6644cf 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>
2017-11-22 17:34:44 +00:00