aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrLayerHoister.h
Commit message (Collapse)AuthorAge
* Remove GrLayerHoisterGravatar robertphillips2016-07-13
| | | | | | | | This relies on https://codereview.chromium.org/1944013002/ (Add legacy flag to allow Skia to remove Ganesh layer hoister) landing first so as to not break the DEPS roll. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950523002 Review-Url: https://codereview.chromium.org/1950523002
* Disable Ganesh layer hoister in a more revertable formGravatar robertphillips2016-05-04
| | | | | | | | I have a worry that disabling the layer hoister might cause a perf regression on tiled architectures. This CL will be easier to revert than https://codereview.chromium.org/1950523002/ (Remove GrLayerHoister) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1945413003 Review-Url: https://codereview.chromium.org/1945413003
* Retract SkDevice a bit moreGravatar robertphillips2016-04-22
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1905383002 Review URL: https://codereview.chromium.org/1905383002
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* Update Layer Hoisting to store its atlas texture in the resource cacheGravatar robertphillips2015-11-09
| | | | | | | | BUG=skia:4346 Committed: https://skia.googlesource.com/skia/+/42597bc99f00553825843b5ed41e81b121773368 Review URL: https://codereview.chromium.org/1406013006
* Revert of Update Layer Hoisting to store its atlas texture in the resource ↵Gravatar robertphillips2015-11-06
| | | | | | | | | | | | | | | | | | | | | | cache (patchset #6 id:100001 of https://codereview.chromium.org/1406013006/ ) Reason for revert: Android Original issue's description: > Update Layer Hoisting to store its atlas texture in the resource cache > > BUG=skia:4346 > > Committed: https://skia.googlesource.com/skia/+/42597bc99f00553825843b5ed41e81b121773368 TBR=bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4346 Review URL: https://codereview.chromium.org/1413483004
* Update Layer Hoisting to store its atlas texture in the resource cacheGravatar robertphillips2015-11-06
| | | | | | BUG=skia:4346 Review URL: https://codereview.chromium.org/1406013006
* Fix layer hoisting image filter corner casesGravatar robertphillips2014-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert of Fix layer hoisting image filter corner cases (patchset #3 id:40001 ↵Gravatar robertphillips2014-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix layer hoisting image filter corner casesGravatar robertphillips2014-12-16
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Apply the layer's image filter to the hoisted imageGravatar robertphillips2014-12-11
| | | | | | | | Exposing SkSurface_Gpu makes me sad and I would welcome alternatives. This change is desireable since it greatly decreases the render target swaps. Review URL: https://codereview.chromium.org/792923002
* Fuse GrReplacements and GrLayerCacheGravatar robertphillips2014-12-03
| | | | | | The conversion step from GrCachedLayer to ReplacementInfo isn't necessary. Review URL: https://codereview.chromium.org/769533004
* Use variable length key (rather than accumulated matrix) as save layer ↵Gravatar robertphillips2014-12-01
| | | | | | | | | | 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
* Add support for hoisting layers in pictures drawn with a matrixGravatar robertphillips2014-11-24
| | | | | | | | Although Chromium doesn't use the drawPicture matrix parameter for their tiling, our local code does. Without such drawPicture calls break layer hoisting. BUG=skia:2315 Review URL: https://codereview.chromium.org/748853002
* Rename GrAccelData to SkLayerInfo and move it to src/coreGravatar robertphillips2014-11-12
| | | | Review URL: https://codereview.chromium.org/719133002
* Address MSAA rendering in layer hoistingGravatar robertphillips2014-11-10
| | | | | | This became relevant whilst attempting to rebaseline the multipicturedraw GMs after turning on layer hoisting inside Skia. Review URL: https://codereview.chromium.org/709943003
* Discard atlas after every MultiPictureDraw::drawGravatar robertphillips2014-10-29
| | | | | | | | | | 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
* Revert of Discard atlas after every MultiPictureDraw::draw (patchset #4 ↵Gravatar robertphillips2014-10-29
| | | | | | | | | | | | | | | | | | | | | | id:60001 of https://codereview.chromium.org/678403002/) Reason for revert: Breaking bots Original issue's description: > 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 TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/687233002
* Discard atlas after every MultiPictureDraw::drawGravatar robertphillips2014-10-29
| | | | | | | | 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. Review URL: https://codereview.chromium.org/678403002
* Alter layer hoisting to only hoist layers for one canvas at a timeGravatar robertphillips2014-10-28
| | | | | | | | | | 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
* Track nested picture xform state for layer hoistingGravatar robertphillips2014-10-22
| | | | | | The accumulated matrix state of any enclosing SkPictures must be stored separate from the picture-local CTM. Any setMatrix calls inside a layer need to replace the picture-local CTM but concatenate with the enclosing SkPicture transform state (and the transform state needed to translate the layer to the correct location in the cached GrTexture). Review URL: https://codereview.chromium.org/639863005
* Expose layer hoisting API in GrContextGravatar robertphillips2014-10-08
| | | | | | This CL exposes the layer hoisting API in GrContext for use in SkMultiPictureDraw::draw. It basically mirrors what SkGpuDevice::EXPERIMENTAL_drawPicture has been doing. Review URL: https://codereview.chromium.org/533673002
* Allow previously-hoisted layers to be reused in the same drawGravatar robertphillips2014-09-30
| | | | | | | | | | | | | In the Sierpinkski test case there are only a few layers appear in the "to be drawn" lists but they those layers get reused a lot of times with different transforms. This CL adds an additional category to allow such layers to be placed in the GrReplacements object without needing to be rendered. This is split out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/) BUG=skia:2315 R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/616023002
* Move offset and CTM from LayerCache Key to per-hoisted-layer infoGravatar robertphillips2014-09-29
| | | | | | | | | | | | | | | | | | 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
* Update layer hoisting code to correctly render sub-picture layersGravatar robertphillips2014-09-24
| | | | | | | | | | | The prior code assumed all layers came from a single picture. BUG=skia:2315 R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/595543002
* Refactor layer hoisting codeGravatar robertphillips2014-09-18
| | | | | | | | | | This CL consolidates the layer hoisting functionality in GrLayerHoister in preparation for retiring SkDpuDevice::EXPERIMENTAL_drawPicture in favor of SkMultiPictureDraw::draw. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/580173002
* Remove use of EXPERIMENTAL_getActiveOps from layer hoisting codeGravatar robertphillips2014-09-03
| | | | | | | | | | This is getting in the way of switching to the SkRecord backend and is of questionable value. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/539693002
* Reorganize Layer Hoisting codeGravatar robertphillips2014-09-02
With the new MultiPictureDraw API the GrContext will be performing the layer hoisting (instead of the SkGpuDevice). This CL being moving the layer hoisting functionality to GrLayerHoister rather then dumping it straight into GrContext. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/531733003