Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3704)

Unified Diff: cc/layers/surface_layer_impl.cc

Issue 1430363002: List all child surfaces (including occluded) in CompositorFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/surface_layer_impl.h ('k') | cc/output/compositor_frame_metadata.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer_impl.cc
diff --git a/cc/layers/surface_layer_impl.cc b/cc/layers/surface_layer_impl.cc
index 546af40c522bd26a41d0fe1304b8db30488d2a88..e0dcadf0b0c40fc6e899d3ab5cee9909333db236 100644
--- a/cc/layers/surface_layer_impl.cc
+++ b/cc/layers/surface_layer_impl.cc
@@ -8,15 +8,19 @@
#include "cc/debug/debug_colors.h"
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/surface_draw_quad.h"
+#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/occlusion.h"
namespace cc {
SurfaceLayerImpl::SurfaceLayerImpl(LayerTreeImpl* tree_impl, int id)
: LayerImpl(tree_impl, id), surface_scale_(0.f) {
+ layer_tree_impl()->AddSurfaceLayer(this);
}
-SurfaceLayerImpl::~SurfaceLayerImpl() {}
+SurfaceLayerImpl::~SurfaceLayerImpl() {
+ layer_tree_impl()->RemoveSurfaceLayer(this);
+}
scoped_ptr<LayerImpl> SurfaceLayerImpl::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
@@ -76,7 +80,6 @@ void SurfaceLayerImpl::AppendQuads(RenderPass* render_pass,
SurfaceDrawQuad* quad =
render_pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, surface_id_);
- render_pass->referenced_surfaces.push_back(surface_id_);
}
void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color,
« no previous file with comments | « cc/layers/surface_layer_impl.h ('k') | cc/output/compositor_frame_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698