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

Side by Side Diff: cc/delegated_renderer_layer_impl.cc

Issue 11882037: Activate LayerImpl tree with sync+push instead of pointer swap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/delegated_renderer_layer_impl.h ('k') | cc/heads_up_display_layer_impl.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/delegated_renderer_layer_impl.h" 5 #include "cc/delegated_renderer_layer_impl.h"
6 6
7 #include "cc/append_quads_data.h" 7 #include "cc/append_quads_data.h"
8 #include "cc/math_util.h" 8 #include "cc/math_util.h"
9 #include "cc/quad_sink.h" 9 #include "cc/quad_sink.h"
10 #include "cc/render_pass_draw_quad.h" 10 #include "cc/render_pass_draw_quad.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (!render_passes_in_draw_order_.empty()) 53 if (!render_passes_in_draw_order_.empty())
54 render_passes_in_draw_order_.back()->damage_rect.Union(old_root_damage); 54 render_passes_in_draw_order_.back()->damage_rect.Union(old_root_damage);
55 } 55 }
56 56
57 void DelegatedRendererLayerImpl::ClearRenderPasses() { 57 void DelegatedRendererLayerImpl::ClearRenderPasses() {
58 // FIXME: Release the resources back to the nested compositor. 58 // FIXME: Release the resources back to the nested compositor.
59 render_passes_index_by_id_.clear(); 59 render_passes_index_by_id_.clear();
60 render_passes_in_draw_order_.clear(); 60 render_passes_in_draw_order_.clear();
61 } 61 }
62 62
63 scoped_ptr<LayerImpl> DelegatedRendererLayerImpl::createLayerImpl(LayerTreeImpl* treeImpl)
64 {
65 return DelegatedRendererLayerImpl::create(treeImpl, id()).PassAs<LayerImpl>( );
66 }
67
63 void DelegatedRendererLayerImpl::didLoseOutputSurface() { 68 void DelegatedRendererLayerImpl::didLoseOutputSurface() {
64 ClearRenderPasses(); 69 ClearRenderPasses();
65 } 70 }
66 71
67 static inline int IndexToId(int index) { return index + 1; } 72 static inline int IndexToId(int index) { return index + 1; }
68 static inline int IdToIndex(int id) { return id - 1; } 73 static inline int IdToIndex(int id) { return id - 1; }
69 74
70 RenderPass::Id DelegatedRendererLayerImpl::firstContributingRenderPassId() 75 RenderPass::Id DelegatedRendererLayerImpl::firstContributingRenderPassId()
71 const { 76 const {
72 return RenderPass::Id(id(), IndexToId(0)); 77 return RenderPass::Id(id(), IndexToId(0));
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 222
218 quad_sink->append(output_quad.Pass(), *append_quads_data); 223 quad_sink->append(output_quad.Pass(), *append_quads_data);
219 } 224 }
220 } 225 }
221 226
222 const char* DelegatedRendererLayerImpl::layerTypeAsString() const { 227 const char* DelegatedRendererLayerImpl::layerTypeAsString() const {
223 return "DelegatedRendererLayer"; 228 return "DelegatedRendererLayer";
224 } 229 }
225 230
226 } // namespace cc 231 } // namespace cc
OLDNEW
« no previous file with comments | « cc/delegated_renderer_layer_impl.h ('k') | cc/heads_up_display_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698