aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrLayerHoister.cpp
Commit message (Collapse)AuthorAge
...
* 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
* Upgrade GPUOptimizeGravatar robertphillips2014-10-30
| | | | | | | | | | | | This will be a bit hairy to review. The FillBounds and CollectLayers code has diverged significantly resulting in the rendering path seeing different bounds than the hoisting path. This CL merges the FillBounds changes into CollectLayers. A follow on CL will, hopefully, find a way to layer CollectLayers on top of FillBounds. The only code in CollectLayers that is different from FillBounds is bracketed by "LAYER HOISTING" comments. NOTREECHECKS=true Review URL: https://codereview.chromium.org/685263004
* 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
* rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlagsGravatar bsalomon2014-10-28
| | | | Review URL: https://codereview.chromium.org/682223002
* 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
* Add clip to layer cacheGravatar robertphillips2014-10-20
| | | | | | | | | | | 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
* Fix bug in GrCachedLayer reuseGravatar robertphillips2014-10-10
| | | | | | | | | | | | 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
* Remove unused SaveLayerInfo::fValid fieldGravatar robertphillips2014-10-09
| | | | | | Minor code cleanup Review URL: https://codereview.chromium.org/643713002
* Refactor GrLayerHoister::FindLayersToHoist to prep for adding clip to cache keyGravatar robertphillips2014-10-09
| | | | | | | | NOTRY=true Committed: https://skia.googlesource.com/skia/+/27415b71bd529456165945e19b5b7efbebf6fb51 Review URL: https://codereview.chromium.org/640373002
* Revert of Refactor GrLayerHoister::FindLayersToHoist to prep for adding clip ↵Gravatar robertphillips2014-10-09
| | | | | | | | | | | | | | | | | | | | to cache key (patchset #1 id:1 of https://codereview.chromium.org/640373002/) Reason for revert: Failing unit tests Original issue's description: > Refactor GrLayerHoister::FindLayersToHoist to prep for adding clip to cache key > > NOTRY=true > > Committed: https://skia.googlesource.com/skia/+/27415b71bd529456165945e19b5b7efbebf6fb51 TBR=jvanverth@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/644823003
* Refactor GrLayerHoister::FindLayersToHoist to prep for adding clip to cache keyGravatar robertphillips2014-10-09
| | | | | | NOTRY=true Review URL: https://codereview.chromium.org/640373002
* 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
* Update GrRecordReplaceDraw to use SkTDynamicHash & add ReplaceDrawGravatar robertphillips2014-10-01
| | | | | | | | | | | | Having hoisted layers from different pictures invalidates the assumptions of the old GrReplacements object. This is fixed by switching to a SkTDynamicHash-based back-end. Sub-picture-layers also require that the replacement drawing occur for the sub-pictures too. The ReplaceDraw object is added to make this happen and limit the replacement lookup to saveLayer draw commands. This is split out of (Fix sub-picture layer rendering bugs - https://codereview.chromium.org/597293002/). BUG=skia:2315 Review URL: https://codereview.chromium.org/607763008
* 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
* Introduce Props to surface (patchset #27 id:520001 of ↵Gravatar reed2014-09-22
| | | | | | | | | | | | https://codereview.chromium.org/551463004/)" This reverts commit 29c857d0f3a1cb837f73406eeb6ba9771879b5e7. TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/588143004
* Revert of introduce Props to surface (patchset #27 id:520001 of ↵Gravatar reed2014-09-21
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/551463004/) Reason for revert: Broke call site in WebKit Original issue's description: > introduce Props to surface (work in progress) > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/3716fd067a5621bb94a6cb08d72afec8bf3aceda R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@google.com TBR=bsalomon@google.com, bungeman@google.com, fmalita@google.com, jvanverth@google.com, reed@google.com, robertphillips@google.com, vangelis@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/583773004
* introduce Props to surface (work in progress)Gravatar reed2014-09-21
| | | | | | | | | BUG=skia: R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/551463004
* remove RenderTargetFlags -- NewRenderTargetDirect will never clearGravatar reed2014-09-19
| | | | | | | | | BUG=skia: R=robertphillips@google.com, bsalomon@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/583043002
* 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
* Fix bug in layer hoisting transition to SkRecord backendGravatar robertphillips2014-09-16
| | | | | | | | | | 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
* Fix two SkRecord-backed layer hoisting bugsGravatar robertphillips2014-09-08
| | | | | | | | | | | | | | | The two bugs are/were: The old loop to draw the hoisted layers included the saveLayer call which caused double application of the layer's paint (This is the +1 change). The hoisted layer is intended to be drawn in device coordinates. The old code was drawing it in the coordinate space of the saveLayer thus it was misplaced (This is the setMatrix change). Committed: https://skia.googlesource.com/skia/+/7c0cfd4ff8f6db50a8731c886db732b106268937 R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/551843002
* Revert of Fix two SkRecord-backed layer hoisting bugs (patchset #1 id:1 of ↵Gravatar robertphillips2014-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/551843002/) Reason for revert: turning bots red Original issue's description: > Fix two SkRecord-backed layer hoisting bugs > > The two bugs are/were: > The old loop to draw the hoisted layers included the saveLayer call which caused double application of the layer's paint (This is the +1 change). > > The hoisted layer is intended to be drawn in device coordinates. The old code was drawing it in the coordinate space of the saveLayer thus it was misplaced (This is the setMatrix change). > > Committed: https://skia.googlesource.com/skia/+/7c0cfd4ff8f6db50a8731c886db732b106268937 R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/553983003
* Fix two SkRecord-backed layer hoisting bugsGravatar robertphillips2014-09-08
| | | | | | | | | | | | | The two bugs are/were: The old loop to draw the hoisted layers included the saveLayer call which caused double application of the layer's paint (This is the +1 change). The hoisted layer is intended to be drawn in device coordinates. The old code was drawing it in the coordinate space of the saveLayer thus it was misplaced (This is the setMatrix change). R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/551843002
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Switch Layer Hoisting over to SkRecord backendGravatar robertphillips2014-09-04
| | | | | | | | | R=bsalomon@google.com TBR=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/540543002
* 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