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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 633773004: cc: Pass Occlusion instead of OcclusionTracker to LayerImpls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 2 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/test/layer_test_common.cc ('k') | cc/trees/layer_tree_host_impl_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 << output_surface_->capabilities().deferred_gl_initialization; 543 << output_surface_->capabilities().deferred_gl_initialization;
544 return DRAW_MODE_SOFTWARE; 544 return DRAW_MODE_SOFTWARE;
545 } 545 }
546 } 546 }
547 547
548 static void AppendQuadsForLayer( 548 static void AppendQuadsForLayer(
549 RenderPass* target_render_pass, 549 RenderPass* target_render_pass,
550 LayerImpl* layer, 550 LayerImpl* layer,
551 const OcclusionTracker<LayerImpl>& occlusion_tracker, 551 const OcclusionTracker<LayerImpl>& occlusion_tracker,
552 AppendQuadsData* append_quads_data) { 552 AppendQuadsData* append_quads_data) {
553 layer->AppendQuads(target_render_pass, occlusion_tracker, append_quads_data); 553 layer->AppendQuads(
554 target_render_pass,
555 occlusion_tracker.GetCurrentOcclusionForLayer(layer->draw_transform()),
556 append_quads_data);
554 } 557 }
555 558
556 static void AppendQuadsForRenderSurfaceLayer( 559 static void AppendQuadsForRenderSurfaceLayer(
557 RenderPass* target_render_pass, 560 RenderPass* target_render_pass,
558 LayerImpl* layer, 561 LayerImpl* layer,
559 const RenderPass* contributing_render_pass, 562 const RenderPass* contributing_render_pass,
560 const OcclusionTracker<LayerImpl>& occlusion_tracker, 563 const OcclusionTracker<LayerImpl>& occlusion_tracker,
561 AppendQuadsData* append_quads_data) { 564 AppendQuadsData* append_quads_data) {
562 bool is_replica = false; 565 bool is_replica = false;
563 layer->render_surface()->AppendQuads(target_render_pass, 566 layer->render_surface()->AppendQuads(target_render_pass,
(...skipping 2813 matching lines...) Expand 10 before | Expand all | Expand 10 after
3377 } 3380 }
3378 3381
3379 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3382 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3380 std::vector<PictureLayerImpl*>::iterator it = 3383 std::vector<PictureLayerImpl*>::iterator it =
3381 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3384 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3382 DCHECK(it != picture_layers_.end()); 3385 DCHECK(it != picture_layers_.end());
3383 picture_layers_.erase(it); 3386 picture_layers_.erase(it);
3384 } 3387 }
3385 3388
3386 } // namespace cc 3389 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698