Commit Graph

1382 Commits

Author SHA1 Message Date
Chris Dalton
84403d7f53 ccpr: Tessellate fans for very large and/or simple paths
This increases CPU work, but reduces overdraw on the GPU as compared to
Redbook fanning.

TBR=bsalomon@google.com

Change-Id: I396b887075d4422531908c2361ee1e26f076d5c3
Reviewed-on: https://skia-review.googlesource.com/107141
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-02-14 17:21:17 +00:00
Cary Clark
82040a9a05 Revert "ccpr: Tessellate fans for very large and/or simple paths"
This reverts commit 4138c972ef.

Reason for revert: broke android flutter build

Original change's description:
> ccpr: Tessellate fans for very large and/or simple paths
> 
> This increases CPU work, but reduces overdraw on the GPU as compared to
> Redbook fanning.
> 
> Bug: skia:
> Change-Id: I47239c964261e0014a94266a71223eab0597bfb8
> Reviewed-on: https://skia-review.googlesource.com/105203
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I98b5c10b97c3fa603de5122d9bb47ca07659242c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/106620
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-02-12 17:29:59 +00:00
Chris Dalton
4138c972ef ccpr: Tessellate fans for very large and/or simple paths
This increases CPU work, but reduces overdraw on the GPU as compared to
Redbook fanning.

Bug: skia:
Change-Id: I47239c964261e0014a94266a71223eab0597bfb8
Reviewed-on: https://skia-review.googlesource.com/105203
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-02-12 17:06:31 +00:00
Mike Reed
193d3a0514 use SkShaper instead of SkTextBox
Change-Id: Ie96d7f65d5826a664f55adcbba829cef2f8248dc
Reviewed-on: https://skia-review.googlesource.com/106021
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-02-10 18:34:37 +00:00
Yuqian Li
efcacfa8a8 Revert "use SkShaper instead of SkTextBox"
This reverts commit 59dad91117.

Reason for revert: Possibly breaks Build-Win-Clang-arm64-Release-Android

Original change's description:
> use SkShaper instead of SkTextBox
> 
> Change-Id: I63fae79007938cb89c122799b8984a88e91ac1e7
> Reviewed-on: https://skia-review.googlesource.com/102863
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=halcanary@google.com,bungeman@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Id865d9e9cce03b4166f818c2bad659bdecc4f447
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/105941
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2018-02-09 03:38:31 +00:00
Mike Reed
59dad91117 use SkShaper instead of SkTextBox
Change-Id: I63fae79007938cb89c122799b8984a88e91ac1e7
Reviewed-on: https://skia-review.googlesource.com/102863
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-02-08 21:42:10 +00:00
Leon Scroggins III
495e0f079c Simplify SkAnimatedImage
Bug: b/63908092

Rather than keeping track of the time and whether the animation is
running, leave that up to the client. Offer a single method to decode
the next frame, allowing the client to stay one frame ahead.

Change-Id: I546013e32e3a0874181b0dce1349bbec07aaadd4
Reviewed-on: https://skia-review.googlesource.com/101544
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-30 18:46:35 +00:00
Florin Malita
cca86f386c [skottie] Hierarchical animators
Instead of a flat animator space, introduce animator groups.

This allows us to encapsulate layer animators and only dispatch ticks
when their owning layer is active.

TBR=

Change-Id: I1fc8a55abf68a712b71969bb1a11275dbe54c236
Reviewed-on: https://skia-review.googlesource.com/101201
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-29 16:16:21 +00:00
Mike Klein
8f11d4dcaf eliminate SK_BUILD_FOR_WIN32
SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing.

Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007

Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561
Reviewed-on: https://skia-review.googlesource.com/99340
Reviewed-by: Mike Reed <reed@google.com>
2018-01-26 19:52:04 +00:00
Jim Van Verth
fc4f768e5a Use int when possible to calculate atlas indices in shaders.
On certain iOS devices half has a mantissa of only 10 bits, which is not
enough to perform the floating point trickery to get the lower bits
out of the "texture coordinates". Instead we use int if available, and
float if not available.

Also re-enables multitexturing for iOS and adds a sample which
stresses the issue, and a version of fontcache that tests multitexturing.

Bug: skia:7285
Change-Id: Ia541b6a418c1860c941071750ceb26459eb846ea
Reviewed-on: https://skia-review.googlesource.com/99800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-01-26 13:54:54 +00:00
Chris Dalton
27059d36d6 ccpr: Use primitive restart feature on ARM
Bug: skia:
Change-Id: Ia7ab55f8b6ecdd674762f5197d35e8db58f07c01
Reviewed-on: https://skia-review.googlesource.com/98180
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-23 21:29:10 +00:00
Mike Reed
0331d37af9 remove unneeded SkFlattenableSerialization
Bug: skia:
Change-Id: I5cf40b88b05dcd8e83383f6271b046eac8d55e35
Reviewed-on: https://skia-review.googlesource.com/98642
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-23 18:13:35 +00:00
Mike Reed
75ae421c24 IWYU -- SkShader.h
Bug: skia:
Change-Id: I57bffc14c4888627a22158e35f3ac3b762138f02
Reviewed-on: https://skia-review.googlesource.com/98520
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-23 18:08:30 +00:00
Florin Malita
ca02c0a464 Convert SVGPong sample to sksg
Use the new scene graph impl instead of old SVG DOM.

TBR=
Change-Id: I590798b362e953aa3554e85669193f7501ba46de
Reviewed-on: https://skia-review.googlesource.com/98441
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-22 22:28:07 +00:00
Leon Scroggins III
4c11945a97 Respect repetition count in SkAnimatedImage
Bug: b/63908092

By default use the repetition count stored in the encoded data (if
any). Allow setting the repetition count manually, so that the
animation will stop after n+1 total cycles (unless -1 is used for
infinite).

If the animation is complete, make start reset it.

When the animation is not running, make update return max double (i.e.
no need to update any time soon).

Fix a bug where the first call to update returned -1.

Share write_bm with CodecAnimTest, for debugging.

Update Sample to check isRunning rather than keeping its own record
of whether the animation is running.

Change-Id: I883e4d7325f7a7b23a422fa9d756f9ea3018f0f8
Reviewed-on: https://skia-review.googlesource.com/97082
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-22 18:53: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
Mike Reed
8ad91a9bf8 remove unused SkRasterizer
Bug: skia:7500
Change-Id: Iaa683cf8f0b18887cce4ec676631d1e1efee1712
Reviewed-on: https://skia-review.googlesource.com/97400
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-21 18:24:11 +00:00
Leon Scroggins III
42ee284567 Use SkAndroidCodec in SkAnimatedImage
Bug: b/63909536
Bug: b/63908092

SkAnimatedImage is designed around a specific Android use case, so move
it into the android folders.

Make SkAnimatedImage hold an SkAndroidCodec (instead of an SkCodec).
Expose fCodec so that SkAnimatedImage can animate by using the internal
SkCodec.

Update the sample to use SkAndroidCodec.

Allow webp to decode a scaled down animation. For RestoreBG frames,
adjust the frameRect (which is erased) to account for the scaling. Add
a test to verify that we decode a webp with a RestoreBG frame
successfully. Disable scaling for later frames in other formats (GIF,
for now), since the code for erasing a RestoreBG frame is currently
unaware of the sampling.

Change-Id: I5dd2b86138f2c7f6adcd08dce1bd49040f7dc224
Reviewed-on: https://skia-review.googlesource.com/94621
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2018-01-16 20:36:09 +00:00
Leon Scroggins III
7a10b332a3 Add an SkDrawable for animated images (e.g. GIF)
Bug: b/63909536

SkAnimatedImage is a simple drawable for animating a GIF. Thread-safety
is left up to the client. At most two bitmaps are stored in the
drawable; one for the current frame and one for a frame that may need to
be restored. The backup frame prevents some cases where we would
otherwise have to re-decode from the beginning of the image.

The API lets the client set the time value, and decodes to match that
time.

TODO:
- Callback for when the animation is complete
- Ability to use SkAndroidCodec
- Modify the loop count (or leave that up to client?)
- Better and/or client-specific caching

Other changes:
- Add a sample which animates a GIF
- Reenable SK_CODEC_PRINTF for debug builds and Android

Change-Id: I945ffbccdb6008f2a05ed4d9b2af869a261fb300
Reviewed-on: https://skia-review.googlesource.com/93420
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-12 19:36:11 +00:00
Chris Dalton
383a2ef6ed CCPR: Rename GrCCPR* -> GrCC*
Also runs clang-format on the files that don't have special shader
builder styling.

Bug: skia:
Change-Id: I4a67569a7c8472acfb9200644c913844a92e3b2d
Reviewed-on: https://skia-review.googlesource.com/92083
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-08 22:51:11 +00:00
Mike Reed
274218ef01 move largest apis into private
Related to https://skia-review.googlesource.com/c/skia/+/91860

Bug: skia:
Change-Id: Ia8fd981b422bbab75541b078277d2e09e1fc9d41
Reviewed-on: https://skia-review.googlesource.com/91940
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-08 20:42:27 +00:00
Chris Dalton
90e8fb1d98 Reland "CCPR: Initial semi-optimized vertex shader Impl"
This is a reland of e3877ce5ce
Original change's description:
> CCPR: Initial semi-optimized vertex shader Impl
> 
> TBR=bsalomon@google.com
> 
> Bug: skia:
> Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c
> Reviewed-on: https://skia-review.googlesource.com/89120
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Bug: skia:
Change-Id: I1d194853540e64df9c7b55ceb388a5d2f32bc258
Reviewed-on: https://skia-review.googlesource.com/90963
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-01-04 23:51:34 +00:00
Florin Malita
2a2dfcbb42 [sksg] Fix paint inval
Paint nodes contribute to invalidation.  Hoist the inval logic from
geometry nodes to draw nodes.

TBR=
Change-Id: Iab33086c377ef4940a84dae3cdccb2c9bdbee99c
Reviewed-on: https://skia-review.googlesource.com/89901
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-29 00:41:00 +00:00
Florin Malita
e5ae84bea7 Fix leak in GM:Rectanizer
TBR=

Change-Id: I0e6135ac7fac433a0539f00a45f569ce4f48aa7c
Reviewed-on: https://skia-review.googlesource.com/89421
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-24 17:06:42 +00:00
Chris Dalton
d23c7c45dc Revert "CCPR: Initial semi-optimized vertex shader Impl"
This reverts commit e3877ce5ce.

Reason for revert: Intel crashing again

Original change's description:
> CCPR: Initial semi-optimized vertex shader Impl
> 
> TBR=bsalomon@google.com
> 
> Bug: skia:
> Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c
> Reviewed-on: https://skia-review.googlesource.com/89120
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com

Change-Id: I2485db30397958722a07c5992c748ab69365ebb6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/89300
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-22 19:05:26 +00:00
Chris Dalton
e3877ce5ce CCPR: Initial semi-optimized vertex shader Impl
TBR=bsalomon@google.com

Bug: skia:
Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c
Reviewed-on: https://skia-review.googlesource.com/89120
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-22 18:42:05 +00:00
Florin Malita
4aa4441186 Initial scene graph (SkSG)
Sketching a thin (as in close-to-skia-semantics) scene graph API, focused on
external animation, inval tracking and minimal repaint.

Only a few concrete classes/features so far:

* Rect/Color/Transform/Group
* basic inval tracking
* a trivial animated sample with inval visualization

Pretty much everything (especially naming) is volatile, so treat accordingly.

The interesting bits to review are likely in Node.{h,cpp} for inval and
SampleSGInval.cpp for usage.

Initial class hierarchy:

  * Node: invalidation/ancestors tracking
  |
   -- * RenderNode: onRender(SkCanvas)
  |   |
  |    -- * Draw (concrete): rendering a [geometry, paint] tuple
  |   |
  |    -- * Group (concrete): grouping multiple RenderNodes
  |   |
  |    -- * EffectNode: single-descendant effect wrapper
  |       |
  |        -- * Transform (concrete): transform effect
  |
   -- * PaintNode: onMakePaint()
  |   |
  |    -- * Color (concrete): SkColor paint wrapper
  |
   -- * GeometryNode: onComputeBounds(), onDraw(SkCanvas, SkPaint)
      |
       -- * Rect (concrete): SkRect wrapper

TBR=

Change-Id: Iacf9b773c181a7582ecd31ee968562f179d1aa1b
Reviewed-on: https://skia-review.googlesource.com/85502
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-21 20:56:32 +00:00
Brian Osman
2871436b2a Revert "CCPR: Initial semi-optimized vertex shader Impl"
This reverts commit a8f6aef13d.

Reason for revert: Looks to failing on ANGLE bots

Original change's description:
> CCPR: Initial semi-optimized vertex shader Impl
> 
> Bug: skia:
> Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18
> Reviewed-on: https://skia-review.googlesource.com/86820
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: Ic5a73434cba4246a72790db2c27d06e7a50f389a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/88220
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-20 22:15:48 +00:00
Chris Dalton
a8f6aef13d CCPR: Initial semi-optimized vertex shader Impl
Bug: skia:
Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18
Reviewed-on: https://skia-review.googlesource.com/86820
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-20 20:59:46 +00:00
Cary Clark
394197d064 Revert "efficiently dash very large rectangles and very long lines"
This reverts commit 1ad81981b0.

Reason for revert: broke chrome layout tests
Original change's description:
> efficiently dash very large rectangles and very long lines
> 
> Speed up dashing when lines and rects are absurdly large.
> 
> Prior to this CL, only horizontal lines were detected.
> 
> The onOnceBeforeDraw changes are there to make debugging easier.
> 
> Also folded in a change to handle dashing of zero length lines.
> 
> R=​reed@google.com, egdaniel@google.com
> Bug: skia:7311
> Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a
> Reviewed-on: https://skia-review.googlesource.com/84862
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=egdaniel@google.com,reed@google.com,caryclark@skia.org

Change-Id: I5e8f04c54486f8cd1a931f6cade92feaaa4a7647
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/87282
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-19 20:20:17 +00:00
Jim Van Verth
744cbb3888 Fix alpha contribution to tonal color.
Also adds a tonal color GM, a grayscale mode to shadowutils GM,
and animated alpha to SampleAndroidShadows.

Bug: skia:
Change-Id: I1dcb5cab7e53ffa7a3bf1a07b6ebfed38df1a9ed
Reviewed-on: https://skia-review.googlesource.com/85002
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-12-19 19:27:06 +00:00
Cary Clark
1ad81981b0 efficiently dash very large rectangles and very long lines
Speed up dashing when lines and rects are absurdly large.

Prior to this CL, only horizontal lines were detected.

The onOnceBeforeDraw changes are there to make debugging easier.

Also folded in a change to handle dashing of zero length lines.

R=reed@google.com, egdaniel@google.com
Bug: skia:7311
Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a
Reviewed-on: https://skia-review.googlesource.com/84862
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-12-19 14:51:26 +00:00
Chris Dalton
2326177e34 CCPR: Don't use instanced draw calls with geometry shaders
It isn't necessary for the vertex shader to know all the points
because everything happens in the geometry shader. It's simpler to use
regular vertex arrays instead.

Bug: skia:
Change-Id: I7bf83180476fbe0ab01492611cd72e72b3f7d4f2
Reviewed-on: https://skia-review.googlesource.com/82881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-11 17:27:38 +00:00
Florin Malita
ba19b6f219 Fix SampleLua build
Change-Id: Ie0114ab16b99aed4343f6255dbc86fb15554ea74
Reviewed-on: https://skia-review.googlesource.com/83380
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-11 17:15:40 +00:00
Mike Reed
0933bc9b67 Revert "Revert "resources: remove most uses of GetResourcePath()""
This reverts commit cca2300559.

Reason for revert: think I guessed wrong about g32 -- unreverting

Original change's description:
> Revert "resources: remove most uses of GetResourcePath()"
> 
> This reverts commit 5093a539de.
> 
> Reason for revert: google3 seems broken
> 
> Original change's description:
> > resources: remove most uses of GetResourcePath()
> > 
> > Going forward, we will standardize on GetResourceAsData(), which will
> > make it easier to run tests in environments without access to the
> > filesystem.
> > 
> > Also: GetResourceAsData() complains when a resource is missing.
> > This is usually an error.
> > 
> > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
> > Reviewed-on: https://skia-review.googlesource.com/82642
> > Reviewed-by: Hal Canary <halcanary@google.com>
> > Commit-Queue: Hal Canary <halcanary@google.com>
> 
> TBR=halcanary@google.com,scroggo@google.com
> 
> Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/83001
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=halcanary@google.com,scroggo@google.com,reed@google.com

Change-Id: I5a46e4de61186a8a5eb9cacd3275e24e311d5a07
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/82942
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-09 01:27:50 +00:00
Mike Reed
cca2300559 Revert "resources: remove most uses of GetResourcePath()"
This reverts commit 5093a539de.

Reason for revert: google3 seems broken

Original change's description:
> resources: remove most uses of GetResourcePath()
> 
> Going forward, we will standardize on GetResourceAsData(), which will
> make it easier to run tests in environments without access to the
> filesystem.
> 
> Also: GetResourceAsData() complains when a resource is missing.
> This is usually an error.
> 
> Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
> Reviewed-on: https://skia-review.googlesource.com/82642
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,scroggo@google.com

Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/83001
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-08 21:09:19 +00:00
Chris Dalton
be4ffab4e2 CCPR: Combine loops and serpentines back into a single shader
Bug: skia:
Change-Id: I945471ccd2580a2d39afd9c80acb8d9e5e196435
Reviewed-on: https://skia-review.googlesource.com/82460
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-08 20:13:18 +00:00
Hal Canary
53e5e7d4ce resources: resource identifiers don't begin with leading slash
Change-Id: I52522ffffbf0f5176ac9156cd563b41d6fdde59f
Reviewed-on: https://skia-review.googlesource.com/82940
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-08 20:03:18 +00:00
Hal Canary
5093a539de resources: remove most uses of GetResourcePath()
Going forward, we will standardize on GetResourceAsData(), which will
make it easier to run tests in environments without access to the
filesystem.

Also: GetResourceAsData() complains when a resource is missing.
This is usually an error.

Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
Reviewed-on: https://skia-review.googlesource.com/82642
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-08 19:30:48 +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
Chris Dalton
a3e9271ec4 CCPR: Eliminate texel buffers
Points cost 8 bytes and indices cost 4. If a point is accessed twice,
it's a wash whether we duplicate it or index. This change eliminates
texel buffers by duplicating points across instance arrays. This
reduces our dependence on extensions as well as getting rid of our
indirect memory access pattern in vertex shaders.

As a result of this change, memory usage by GPU buffers will only be a
fraction larger at worst, and slightly better at best.

Bug: skia:
Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD
Change-Id: I3c7f03772edd4f850d5fdd7b55552647335c1b52
Reviewed-on: https://skia-review.googlesource.com/79185
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-05 21:12:48 +00:00
Chris Dalton
a32a3c32c3 Add analytic clip FPs that read from the CCPR atlas
Bug: skia:7190
Change-Id: Ie31d368f52910e6917efdeb1b024370b06fc11ee
Reviewed-on: https://skia-review.googlesource.com/77160
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-05 18:06:18 +00:00
Chris Dalton
1ef80942b3 turn on extended Clang warnings on Windows too
Plus some small rearrangements of the various warning lists.

Change-Id: Ied58f940341d69ddab971a529fd01b1e96b65641
Reviewed-on: https://skia-review.googlesource.com/67720
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-04 19:29:51 +00:00
Florin Malita
d75f3f99d4 Fix SVGPong slide crash in Viewer
SVGPong relies on onOnceBeforeDraw() to initialize, but when switching
slides via Viewer's UI, onAnimate() is fired before the first paint.

Change-Id: I7be133072ec635975f7463538cd42edb69696b3f
Reviewed-on: https://skia-review.googlesource.com/79424
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-03 01:15:32 +00:00
Brian Osman
8ceee43de4 Remove more views code, just to simplify things
Bug: skia:
Change-Id: Ie31a3c764e4f88f2b08f4198bd253841a2d8c264
Reviewed-on: https://skia-review.googlesource.com/79100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-01 17:12:49 +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
Brian Osman
2bd856ded9 Fix XferDemo by sending push button events directly to parent
Bug: skia:
Change-Id: I3141dd34a9a04c7a660000cba9e483191f28ef03
Reviewed-on: https://skia-review.googlesource.com/75362
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-22 16:37:24 +00:00
Brian Osman
eff04b5ec2 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>
2017-11-21 18:37:19 +00:00
Brian Osman
11adf3200d Remove clutter from experimental
SkMatrix has the canonical version of setPolyToPoly, we don't need three
other copies sitting around.

SkBorder appears to be useless.

Bug: skia:
Change-Id: Ie747ff7af6cf1d03e6276e8d7fe57e9b3e4ad411
Reviewed-on: https://skia-review.googlesource.com/74141
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-21 15:44:19 +00:00