diff options
author | danakj <danakj@chromium.org> | 2015-02-13 14:12:16 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-13 22:12:46 +0000 |
commit | 4902c30c928ceb9f14366d9a6cad5ef85968a058 (patch) | |
tree | d8591afefe165b48f62adb971acd104d58de1c62 /cc/layers/picture_layer_impl.h | |
parent | 984bf74de879dde74718e1107fa945b944abd36c (diff) | |
download | chromium_src-4902c30c928ceb9f14366d9a6cad5ef85968a058.zip chromium_src-4902c30c928ceb9f14366d9a6cad5ef85968a058.tar.gz chromium_src-4902c30c928ceb9f14366d9a6cad5ef85968a058.tar.bz2 |
cc: Make occlusion a draw property.
We were computing occlusion twice, once in UpdateDrawProperties
and once in CalculateRenderPasses. Now just do it once in
UpdateDrawProperties, which means we don't have to do that work
at all if we draw again without dirtying the render surface layer
list.
This moves the call to UpdateTiles out of the loop for occlusion,
instead calling it directly on each of the picture layers on the
tree, meaning it does not have to be virtual anymore.
This makes it possible for us to call UpdateTiles on picture layers
that were not part of the RenderSurfaceLayerList. Though for now
I left the behaviour as is with a TODO.
Also removed all the old LayerTreeHostOcclusionTests. Added a few
new ones to ensure occlusion gets saved correctly in layers and
surfaces. The test cases that would be missing, I moved to be
OcclusionTrackerTests.
R=enne, vmpstr
BUG=446751
Review URL: https://codereview.chromium.org/915083004
Cr-Commit-Position: refs/heads/master@{#316306}
Diffstat (limited to 'cc/layers/picture_layer_impl.h')
-rw-r--r-- | cc/layers/picture_layer_impl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h index e2dfea1..dbc3804 100644 --- a/cc/layers/picture_layer_impl.h +++ b/cc/layers/picture_layer_impl.h @@ -57,8 +57,6 @@ class CC_EXPORT PictureLayerImpl void AppendQuads(RenderPass* render_pass, const Occlusion& occlusion_in_content_space, AppendQuadsData* append_quads_data) override; - bool UpdateTiles(const Occlusion& occlusion_in_content_space, - bool resourceless_software_draw) override; void NotifyTileStateChanged(const Tile* tile) override; void DidBeginTracing() override; void ReleaseResources() override; @@ -81,6 +79,8 @@ class CC_EXPORT PictureLayerImpl void UpdateRasterSource(scoped_refptr<RasterSource> raster_source, Region* new_invalidation, const PictureLayerTilingSet* pending_set); + bool UpdateTiles(const Occlusion& occlusion_in_content_space, + bool resourceless_software_draw); // Mask-related functions. void GetContentsResourceId(ResourceProvider::ResourceId* resource_id, |