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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 | 644 |
645 QuadSink quad_culler(target_render_pass, &occlusion_tracker); | 645 QuadSink quad_culler(target_render_pass, &occlusion_tracker); |
646 | 646 |
647 // Manually create the quad state for the gutter quads, as the root layer | 647 // Manually create the quad state for the gutter quads, as the root layer |
648 // doesn't have any bounds and so can't generate this itself. | 648 // doesn't have any bounds and so can't generate this itself. |
649 // TODO(danakj): Make the gutter quads generated by the solid color layer | 649 // TODO(danakj): Make the gutter quads generated by the solid color layer |
650 // (make it smarter about generating quads to fill unoccluded areas). | 650 // (make it smarter about generating quads to fill unoccluded areas). |
651 | 651 |
652 gfx::Rect root_target_rect = root_layer->render_surface()->content_rect(); | 652 gfx::Rect root_target_rect = root_layer->render_surface()->content_rect(); |
653 float opacity = 1.f; | 653 float opacity = 1.f; |
| 654 int sorting_context_id = 0; |
654 SharedQuadState* shared_quad_state = quad_culler.CreateSharedQuadState(); | 655 SharedQuadState* shared_quad_state = quad_culler.CreateSharedQuadState(); |
655 shared_quad_state->SetAll(gfx::Transform(), | 656 shared_quad_state->SetAll(gfx::Transform(), |
656 root_target_rect.size(), | 657 root_target_rect.size(), |
657 root_target_rect, | 658 root_target_rect, |
658 root_target_rect, | 659 root_target_rect, |
659 false, | 660 false, |
660 opacity, | 661 opacity, |
661 SkXfermode::kSrcOver_Mode); | 662 SkXfermode::kSrcOver_Mode, |
| 663 sorting_context_id); |
662 | 664 |
663 for (Region::Iterator fill_rects(screen_background_color_region); | 665 for (Region::Iterator fill_rects(screen_background_color_region); |
664 fill_rects.has_rect(); | 666 fill_rects.has_rect(); |
665 fill_rects.next()) { | 667 fill_rects.next()) { |
666 gfx::Rect screen_space_rect = fill_rects.rect(); | 668 gfx::Rect screen_space_rect = fill_rects.rect(); |
667 gfx::Rect visible_screen_space_rect = screen_space_rect; | 669 gfx::Rect visible_screen_space_rect = screen_space_rect; |
668 // Skip the quad culler and just append the quads directly to avoid | 670 // Skip the quad culler and just append the quads directly to avoid |
669 // occlusion checks. | 671 // occlusion checks. |
670 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); | 672 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); |
671 quad->SetNew(shared_quad_state, | 673 quad->SetNew(shared_quad_state, |
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3153 } | 3155 } |
3154 | 3156 |
3155 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3157 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3156 std::vector<PictureLayerImpl*>::iterator it = | 3158 std::vector<PictureLayerImpl*>::iterator it = |
3157 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3159 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3158 DCHECK(it != picture_layers_.end()); | 3160 DCHECK(it != picture_layers_.end()); |
3159 picture_layers_.erase(it); | 3161 picture_layers_.erase(it); |
3160 } | 3162 } |
3161 | 3163 |
3162 } // namespace cc | 3164 } // namespace cc |
OLD | NEW |