History log of /external/skia/tests/GpuLayerCacheTest.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
478dd723362fefc2023aee03e11216d913eeac03 16-Dec-2014 robertphillips <robertphillips@google.com> Fix layer hoisting image filter corner cases

This CL fixes 5 bugs related to hoisting image filters:

For image filters the src layer (the one prior to filtering) often needs to be
smaller then the final layer. This requires the saveLayer's optional bounds
to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in
compute_source_rect and carried around in GrCachedLayer.

The image filters can add an extra offset to the final draw operation.
This is now computed in GrLayerHoister::FilterLayer and carried around in
GrCachedLayer.

Filtered layers must use exact matches. This is now done in GrLayerCache::lock.

The filter cache requires a valid matrix so it can compute the correct offset.
This is now done in GrLayerHoister::FilterLayer.

Filtered layers need to be drawn with drawSprite while unfiltered (and therefore
hopefully atlased) layers can be drawn with drawBitmap. This is now done in
draw_replacement_bitmap.

Committed: https://skia.googlesource.com/skia/+/702eb9622102599d94ab6798e6227cf29f48c2d3

Review URL: https://codereview.chromium.org/803183003
/external/skia/tests/GpuLayerCacheTest.cpp
86f032832fc3527ab561bcbd9d2a546f7f676f73 16-Dec-2014 robertphillips <robertphillips@google.com> Revert of Fix layer hoisting image filter corner cases (patchset #3 id:40001 of https://codereview.chromium.org/803183003/)

Reason for revert:
Breaking DM

Original issue's description:
> Fix layer hoisting image filter corner cases
>
> This CL fixes 5 bugs related to hoisting image filters:
>
> For image filters the src layer (the one prior to filtering) often needs to be
> smaller then the final layer. This requires the saveLayer's optional bounds
> to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in
> compute_source_rect and carried around in GrCachedLayer.
>
> The image filters can add an extra offset to the final draw operation.
> This is now computed in GrLayerHoister::FilterLayer and carried around in
> GrCachedLayer.
>
> Filtered layers must use exact matches. This is now done in GrLayerCache::lock.
>
> The filter cache requires a valid matrix so it can compute the correct offset.
> This is now done in GrLayerHoister::FilterLayer.
>
> Filtered layers need to be drawn with drawSprite while unfiltered (and therefore
> hopefully atlased) layers can be drawn with drawBitmap. This is now done in
> draw_replacement_bitmap.
>
> Committed: https://skia.googlesource.com/skia/+/702eb9622102599d94ab6798e6227cf29f48c2d3

TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/790643009
/external/skia/tests/GpuLayerCacheTest.cpp
702eb9622102599d94ab6798e6227cf29f48c2d3 16-Dec-2014 robertphillips <robertphillips@google.com> Fix layer hoisting image filter corner cases

This CL fixes 5 bugs related to hoisting image filters:

For image filters the src layer (the one prior to filtering) often needs to be
smaller then the final layer. This requires the saveLayer's optional bounds
to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in
compute_source_rect and carried around in GrCachedLayer.

The image filters can add an extra offset to the final draw operation.
This is now computed in GrLayerHoister::FilterLayer and carried around in
GrCachedLayer.

Filtered layers must use exact matches. This is now done in GrLayerCache::lock.

The filter cache requires a valid matrix so it can compute the correct offset.
This is now done in GrLayerHoister::FilterLayer.

Filtered layers need to be drawn with drawSprite while unfiltered (and therefore
hopefully atlased) layers can be drawn with drawBitmap. This is now done in
draw_replacement_bitmap.

Review URL: https://codereview.chromium.org/803183003
/external/skia/tests/GpuLayerCacheTest.cpp
b5f4961b30c99afa15775d63df6b605aaecdced8 12-Dec-2014 kkinnunen <kkinnunen@nvidia.com> Fix GpuLayerCacheTest compile error

Fix GpuLayerCacheTest compile error:
GpuLayerCacheTest.cpp:120:34: error: comparison between signed and
unsigned integer expressions [-Werror=sign-compare]

gcc --version
gcc (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04) 4.6.4

Review URL: https://codereview.chromium.org/794003003
/external/skia/tests/GpuLayerCacheTest.cpp
e99d499caa7dbc80b58e0faf5ce137e7d30cc5d0 03-Dec-2014 robertphillips <robertphillips@google.com> Fuse GrReplacements and GrLayerCache

The conversion step from GrCachedLayer to ReplacementInfo isn't necessary.

Review URL: https://codereview.chromium.org/769533004
/external/skia/tests/GpuLayerCacheTest.cpp
01d6e5f462d1d52203ee1a6660415877e4cf2dde 01-Dec-2014 robertphillips <robertphillips@google.com> Use variable length key (rather than accumulated matrix) as save layer hoisting key

Adding the rendering canvas' CTM to the layer hoisting key (i.e., Add support for hoisting layers in pictures drawn with a matrix - https://codereview.chromium.org/748853002/) has increased the cache miss rate due to accumulated floating point error. This CL fixes part of the issue by using the chain of operation indices leading to each saveLayer as the key. The canvas' CTM must still form part of the key but should be less subject to accumulated error.

BUG=skia:2315

Review URL: https://codereview.chromium.org/753253002
/external/skia/tests/GpuLayerCacheTest.cpp
04c96950554b4e416755c5bc23022674518a6e8b 24-Nov-2014 mtklein <mtklein@chromium.org> Remove Picture deletion listeners.

Looks like we can just have ~SkPicture put the message on the bus directly.

BUG=skia:3144

Review URL: https://codereview.chromium.org/751663002
/external/skia/tests/GpuLayerCacheTest.cpp
4ab5a9048cf327adfc9ef9757ea956d7003ba047 29-Oct-2014 robertphillips <robertphillips@google.com> Discard atlas after every MultiPictureDraw::draw

This is intended to prevent ghosting on tiled architectures.

This CL also defers creation of the atlas (and its texture) until it is actually needed.

Committed: https://skia.googlesource.com/skia/+/6d5b5455743414ddb11d2b8c1fe9d7959f2b853d

Review URL: https://codereview.chromium.org/678403002
/external/skia/tests/GpuLayerCacheTest.cpp
f2703d83da3ab2ae18b45231fd4f11e16cce3184 28-Oct-2014 bsalomon <bsalomon@google.com> rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags

Review URL: https://codereview.chromium.org/682223002
/external/skia/tests/GpuLayerCacheTest.cpp
fd61ed0d7929cf85e0b936f48c72035af4c0a4b3 28-Oct-2014 robertphillips <robertphillips@google.com> Alter layer hoisting to only hoist layers for one canvas at a time

This CL alters layer hoisting to defer creation of the free floating layers until they are actually needed (rather than creating _all_ the hoisted layers at the start).

It also fixes a pre vs. post Concat bug with how matrices were being accumulated.

BUG=skia:2315

Review URL: https://codereview.chromium.org/657383004
/external/skia/tests/GpuLayerCacheTest.cpp
3aac6e0848010efe046bd86bcb341dad5a23e174 20-Oct-2014 robertphillips <robertphillips@google.com> Add clip to layer cache

This CL adds the clip region to the GPU layer hoisting image cache. It also switches back to the old caching behavior of using the entire CTM in the cache key rather then just the upper 2x2. This latter change is to focus more on hoisting rather then caching.

It also includes 2 smaller fixes:
a) layer's that have an image filter are no longer atlased (b.c. doing so complicates applying the image filter)

b) the result of clipping the layer's bounds to the current clip is used as the hoisted layer's size. This reduces the amount of pixels drawn to match a normal (non-hoisted) draw pass.

Review URL: https://codereview.chromium.org/640773004
/external/skia/tests/GpuLayerCacheTest.cpp
7bb9ed756e8663afe68e1a5fc680d57f83a31fea 10-Oct-2014 robertphillips <robertphillips@google.com> Fix bug in GrCachedLayer reuse

In the new MultiPictureDraw tests a single hoisted layer is reused multiple times. The previous plot locking scheme allowed GrCachedLayer objects to be aggressively deleted prematurely leaving the reusing GrHoistedLayer objects with dangling pointers.

This CL changes adds a new pseudo-ref to GrCachedLayer. (It can't be a real ref since the cached layers aren't deleted when it goes to 0).

NOTRY=true

Committed: https://skia.googlesource.com/skia/+/5c481666c9678f43e039ad605457be3854cf8de3

Review URL: https://codereview.chromium.org/640323002
/external/skia/tests/GpuLayerCacheTest.cpp
ed42059d2f97d4f8d247af3cbf5dc290c32785eb 29-Sep-2014 robertphillips <robertphillips@google.com> Move offset and CTM from LayerCache Key to per-hoisted-layer info

This CL reduces the amount of information used in the layer cache key:
- the stop value isn't needed since the start value uniquely identifies the layer in the picture.
- only the upper-left 2x2 portion of the CTM should be used as a key for looking up cached layers.
- individual layers can be redraw in different locations so the final offset cannot be a part of the key.

Since this data is no longer stored in the cached layer, but is still required to draw the cached layer, it is now stored in the per-layer information (i.e., HoistedLayer).

This is split out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/).

BUG=skia:2315
R=egdaniel@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/609403003
/external/skia/tests/GpuLayerCacheTest.cpp
4aa6dfc0b77af9ac298bb9d48991b72a2fec00b2 17-Sep-2014 robertphillips <robertphillips@google.com> Separate replacement creation from layer discovery

This is a simple refactoring that sets the stage for eliminating GrReplacements::ReplacementInfo and splitting up EXPERIMENTAL_drawPicture to support multi picture draw.

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/559603004
/external/skia/tests/GpuLayerCacheTest.cpp
4815fe5a0a497b676677fb4e4a0f05c511855490 16-Sep-2014 robertphillips <robertphillips@google.com> Fix bug in layer hoisting transition to SkRecord backend

Care must be taken when setting up the initial CTM matrix for partial SkRecord playbacks b.c. all the setMatrix calls will concatenate with the initial matrix (which may be different then the CTM that is required to draw correctly).

R=mtklein@google.com, bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/549143003
/external/skia/tests/GpuLayerCacheTest.cpp
49f085dddff10473b6ebf832a974288300224e60 05-Sep-2014 bsalomon <bsalomon@google.com> "NULL !=" = NULL

R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
/external/skia/tests/GpuLayerCacheTest.cpp
6f294af43bcd94ed9616a7e4f5892589813d0a01 18-Aug-2014 robertphillips <robertphillips@google.com> Refactor GrLayerCache for new API

The only substantive change in this CL is skipping atlasing
for any layers that are involved in nesting. Prior versions
have allowed nesting layers to be atlased.

--------------------------------------------------------

All times are on Windows with a repeat count of 200.
Format is: <time in ms> (<# of glBindframebuffer calls>)

How to interpret this:

For the boogie page:

both columns should be the same (since boogie has no
nested layers)
without the new API the tiled case doesn't show any real
benefit from hoisting

For the carsvg page:

The nesting change does increase the number of FBO
switches but doesn't kill performance
Because of the location & size of the layers the
tile case does show some improvement (even
without the new API)

boogie
-------

w/o nested change w/ nested change

simple 5.62 (811) N/A

tiled 7.72 (811) N/A

simple w/ hoisting 5.23 (409) 5.77 (409)
(but no caching)

tiled w/ hoisting 7.57 (809) 7.49 (809)
(but no caching)

carsvg
------

w/o nested change w/ nested change

simple 60.37 (141990) N/A

tiled 115.13 (256929) N/A

simple w/ hoisting 41.57 (64570) 42.82 (72279)
(but no caching)

tiled w/ hoisting 84.24 (154352) 84.71 (165630)
(but no caching)

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/476833004
/external/skia/tests/GpuLayerCacheTest.cpp
0c4233285919c10df63c6cb207e580a7d1ff66b4 31-Jul-2014 robertphillips <robertphillips@google.com> Add CTM to the cached layers' key and reduce render target pingponging in layer pre-rendering

The CTM is required on the key so we will re-render when necessary.
The SkGpuDevice change ensures big layers in the midst of atlas-able layers don't cause a render target switch.

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/433553002
/external/skia/tests/GpuLayerCacheTest.cpp
09dde64628fcbf611891fa293c144835c7dfa644 29-Jul-2014 robertphillips <robertphillips@google.com> Now always use Atlas for layer cache

This is setup for running cluster telemetry tests

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/429593002
/external/skia/tests/GpuLayerCacheTest.cpp
320c92380fe6a43dffbcd3f9e7c99897da44298d 29-Jul-2014 robertphillips <robertphillips@google.com> Add plot-based purging to GrLayerCache

This CL allows a GrPlot full of atlased layer to be purged from the atlas to make room for new layers.

R=jvanverth@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/411703003
/external/skia/tests/GpuLayerCacheTest.cpp
d771f6bc273457bc7aa95938ac326dfbbf876e1a 22-Jul-2014 robertphillips <robertphillips@google.com> Add auto purging for SkPicture-related Ganesh resources (esp. layers)

This is intended to lower the bookkeeping burden for the Layer Caching feature. Cached layers are now automatically purged when a picture is deleted.

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/408923002
/external/skia/tests/GpuLayerCacheTest.cpp
e904c09a3a9c701e8d91f2f6ee161feda7615d90 17-Jul-2014 bsalomon <bsalomon@google.com> Fix alpha textures in NV ES3 contexts on Windows.

Make unit tests iterate over all the rendering GL context types rather than using kNative.

Fix the extension printing when gStartupSpew is set.

R=jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/398183002
/external/skia/tests/GpuLayerCacheTest.cpp
21048b588faa6a1c84949603ba82d9d4ba2f0cdd 16-Jul-2014 robertphillips <robertphillips@google.com> Always have GrLayer's rect be valid

This CL just makes atlasing easier/clearer since there is a separate atlased query method. Not using the rect as a signal also simplifies the rendering of the layer in SkGpuDevice.cpp.

This is calved off from (Add atlased layer purging - https://codereview.chromium.org/367073002/)

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/384233002
/external/skia/tests/GpuLayerCacheTest.cpp
cfaeec446d06058cacef068b09f58ae2c78338fa 13-Jul-2014 Robert Phillips <robertphillips@google.com> Remove Skia's use of the default SkPicture constructor and multi-clone

This cannot be landed until (Chrome: Switch to one-at-a-time SkPicture::clone interface - https://codereview.chromium.org/380323002/) has landed.

R=mtklein@google.com
TBR=reed@google.com

Review URL: https://codereview.chromium.org/388833003
/external/skia/tests/GpuLayerCacheTest.cpp
952841bf41a81228c23d16c7204b458abe0d7136 30-Jun-2014 robertphillips <robertphillips@google.com> Begin atlasing

This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled):

1) the atlased layers cannot be purged nor aged out
2) the texture backing the atlas is not pulled from (or returned to) the resource cache

#1 is on hold until we have a recycling rectanizer

A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents.

Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/354533004
/external/skia/tests/GpuLayerCacheTest.cpp
e462f2bed33283862bb983c67776a47c5a6acb01 30-Jun-2014 robertphillips <robertphillips@google.com> Revert of Begin atlasing (https://codereview.chromium.org/354533004/)

Reason for revert:
Sigh

Original issue's description:
> Begin atlasing
>
> This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled):
>
> 1) the atlased layers cannot be purged nor aged out
> 2) the texture backing the atlas is not pulled from (or returned to) the resource cache
>
> #1 is on hold until we have a recycling rectanizer
>
> A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents.
>
> Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b

R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/359953002
/external/skia/tests/GpuLayerCacheTest.cpp
55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b 30-Jun-2014 robertphillips <robertphillips@google.com> Begin atlasing

This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled):

1) the atlased layers cannot be purged nor aged out
2) the texture backing the atlas is not pulled from (or returned to) the resource cache

#1 is on hold until we have a recycling rectanizer

A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents.

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/354533004
/external/skia/tests/GpuLayerCacheTest.cpp