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

Side by Side Diff: cc/layers/surface_layer_impl.cc

Issue 2905533002: cc : Store surface layer ids on LayerTreeHost and push them at commit (Closed)
Patch Set: initialize Created 3 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « cc/layers/surface_layer.cc ('k') | cc/layers/surface_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/surface_layer_impl.h" 5 #include "cc/layers/surface_layer_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/trace_event/trace_event_argument.h" 9 #include "base/trace_event/trace_event_argument.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
11 #include "cc/layers/append_quads_data.h" 11 #include "cc/layers/append_quads_data.h"
12 #include "cc/quads/solid_color_draw_quad.h" 12 #include "cc/quads/solid_color_draw_quad.h"
13 #include "cc/quads/surface_draw_quad.h" 13 #include "cc/quads/surface_draw_quad.h"
14 #include "cc/trees/layer_tree_impl.h" 14 #include "cc/trees/layer_tree_impl.h"
15 #include "cc/trees/occlusion.h" 15 #include "cc/trees/occlusion.h"
16 16
17 namespace cc { 17 namespace cc {
18 18
19 SurfaceLayerImpl::SurfaceLayerImpl(LayerTreeImpl* tree_impl, int id) 19 SurfaceLayerImpl::SurfaceLayerImpl(LayerTreeImpl* tree_impl, int id)
20 : LayerImpl(tree_impl, id) { 20 : LayerImpl(tree_impl, id) {}
21 layer_tree_impl()->AddSurfaceLayer(this);
22 }
23 21
24 SurfaceLayerImpl::~SurfaceLayerImpl() { 22 SurfaceLayerImpl::~SurfaceLayerImpl() {}
25 layer_tree_impl()->RemoveSurfaceLayer(this);
26 }
27 23
28 std::unique_ptr<LayerImpl> SurfaceLayerImpl::CreateLayerImpl( 24 std::unique_ptr<LayerImpl> SurfaceLayerImpl::CreateLayerImpl(
29 LayerTreeImpl* tree_impl) { 25 LayerTreeImpl* tree_impl) {
30 return SurfaceLayerImpl::Create(tree_impl, id()); 26 return SurfaceLayerImpl::Create(tree_impl, id());
31 } 27 }
32 28
33 void SurfaceLayerImpl::SetPrimarySurfaceInfo(const SurfaceInfo& surface_info) { 29 void SurfaceLayerImpl::SetPrimarySurfaceInfo(const SurfaceInfo& surface_info) {
34 if (primary_surface_info_ == surface_info) 30 if (primary_surface_info_ == surface_info)
35 return; 31 return;
36 32
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 dict->SetString("surface_id", primary_surface_info_.id().ToString()); 242 dict->SetString("surface_id", primary_surface_info_.id().ToString());
247 dict->SetString("fallback_surface_id", 243 dict->SetString("fallback_surface_id",
248 fallback_surface_info_.id().ToString()); 244 fallback_surface_info_.id().ToString());
249 } 245 }
250 246
251 const char* SurfaceLayerImpl::LayerTypeAsString() const { 247 const char* SurfaceLayerImpl::LayerTypeAsString() const {
252 return "cc::SurfaceLayerImpl"; 248 return "cc::SurfaceLayerImpl";
253 } 249 }
254 250
255 } // namespace cc 251 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/surface_layer.cc ('k') | cc/layers/surface_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698