OLD | NEW |
---|---|
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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
539 << output_surface_->capabilities().deferred_gl_initialization; | 539 << output_surface_->capabilities().deferred_gl_initialization; |
540 return DRAW_MODE_SOFTWARE; | 540 return DRAW_MODE_SOFTWARE; |
541 } | 541 } |
542 } | 542 } |
543 | 543 |
544 static void AppendQuadsForLayer( | 544 static void AppendQuadsForLayer( |
545 RenderPass* target_render_pass, | 545 RenderPass* target_render_pass, |
546 LayerImpl* layer, | 546 LayerImpl* layer, |
547 const OcclusionTracker<LayerImpl>& occlusion_tracker, | 547 const OcclusionTracker<LayerImpl>& occlusion_tracker, |
548 AppendQuadsData* append_quads_data) { | 548 AppendQuadsData* append_quads_data) { |
549 layer->AppendQuads(target_render_pass, occlusion_tracker, append_quads_data); | 549 layer->AppendQuads( |
550 target_render_pass, | |
551 occlusion_tracker.GetCurrentOcclusionForLayer(layer->draw_transform()), | |
vmpstr
2014/10/07 06:44:35
This is where "conversion" actually happens.
| |
552 append_quads_data); | |
550 } | 553 } |
551 | 554 |
552 static void AppendQuadsForRenderSurfaceLayer( | 555 static void AppendQuadsForRenderSurfaceLayer( |
553 RenderPass* target_render_pass, | 556 RenderPass* target_render_pass, |
554 LayerImpl* layer, | 557 LayerImpl* layer, |
555 const RenderPass* contributing_render_pass, | 558 const RenderPass* contributing_render_pass, |
556 const OcclusionTracker<LayerImpl>& occlusion_tracker, | 559 const OcclusionTracker<LayerImpl>& occlusion_tracker, |
557 AppendQuadsData* append_quads_data) { | 560 AppendQuadsData* append_quads_data) { |
558 bool is_replica = false; | 561 bool is_replica = false; |
559 layer->render_surface()->AppendQuads(target_render_pass, | 562 layer->render_surface()->AppendQuads(target_render_pass, |
560 occlusion_tracker, | 563 occlusion_tracker, |
561 append_quads_data, | 564 append_quads_data, |
562 is_replica, | 565 is_replica, |
563 contributing_render_pass->id); | 566 contributing_render_pass->id); |
564 | 567 |
565 // Add replica after the surface so that it appears below the surface. | 568 // Add replica after the surface so that it appears below the surface. |
566 if (layer->has_replica()) { | 569 if (layer->has_replica()) { |
567 is_replica = true; | 570 is_replica = true; |
568 layer->render_surface()->AppendQuads(target_render_pass, | 571 layer->render_surface()->AppendQuads(target_render_pass, |
569 occlusion_tracker, | 572 occlusion_tracker, |
danakj
2014/10/07 17:01:23
surfaceimpl comes next i guess?
vmpstr
2014/10/07 18:50:10
That's the plan. Then possibly cc::Layer::Update c
danakj
2014/10/07 18:54:26
TiledLayer calls Occluded() on it to paint-cull. T
| |
570 append_quads_data, | 573 append_quads_data, |
571 is_replica, | 574 is_replica, |
572 contributing_render_pass->id); | 575 contributing_render_pass->id); |
573 } | 576 } |
574 } | 577 } |
575 | 578 |
576 static void AppendQuadsToFillScreen( | 579 static void AppendQuadsToFillScreen( |
577 ResourceProvider::ResourceId overhang_resource_id, | 580 ResourceProvider::ResourceId overhang_resource_id, |
578 const gfx::SizeF& overhang_resource_scaled_size, | 581 const gfx::SizeF& overhang_resource_scaled_size, |
579 const gfx::Rect& root_scroll_layer_rect, | 582 const gfx::Rect& root_scroll_layer_rect, |
(...skipping 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3371 } | 3374 } |
3372 | 3375 |
3373 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3376 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3374 std::vector<PictureLayerImpl*>::iterator it = | 3377 std::vector<PictureLayerImpl*>::iterator it = |
3375 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3378 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3376 DCHECK(it != picture_layers_.end()); | 3379 DCHECK(it != picture_layers_.end()); |
3377 picture_layers_.erase(it); | 3380 picture_layers_.erase(it); |
3378 } | 3381 } |
3379 | 3382 |
3380 } // namespace cc | 3383 } // namespace cc |
OLD | NEW |