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

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

Issue 332873005: Rendering context information added to SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rendering context now in Layers, removed is_3d_sorted Created 6 years, 6 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
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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 644
645 gfx::Rect root_target_rect = root_layer->render_surface()->content_rect(); 645 gfx::Rect root_target_rect = root_layer->render_surface()->content_rect();
646 float opacity = 1.f; 646 float opacity = 1.f;
647 SharedQuadState* shared_quad_state = quad_culler.CreateSharedQuadState(); 647 SharedQuadState* shared_quad_state = quad_culler.CreateSharedQuadState();
648 shared_quad_state->SetAll(gfx::Transform(), 648 shared_quad_state->SetAll(gfx::Transform(),
649 root_target_rect.size(), 649 root_target_rect.size(),
650 root_target_rect, 650 root_target_rect,
651 root_target_rect, 651 root_target_rect,
652 false, 652 false,
653 opacity, 653 opacity,
654 SkXfermode::kSrcOver_Mode); 654 SkXfermode::kSrcOver_Mode,
655 0);
danakj 2014/06/15 18:15:36 can you give this literal a name by using a tempor
troyhildebrandt 2014/06/17 00:29:43 Done.
655 656
656 for (Region::Iterator fill_rects(screen_background_color_region); 657 for (Region::Iterator fill_rects(screen_background_color_region);
657 fill_rects.has_rect(); 658 fill_rects.has_rect();
658 fill_rects.next()) { 659 fill_rects.next()) {
659 gfx::Rect screen_space_rect = fill_rects.rect(); 660 gfx::Rect screen_space_rect = fill_rects.rect();
660 gfx::Rect visible_screen_space_rect = screen_space_rect; 661 gfx::Rect visible_screen_space_rect = screen_space_rect;
661 // Skip the quad culler and just append the quads directly to avoid 662 // Skip the quad culler and just append the quads directly to avoid
662 // occlusion checks. 663 // occlusion checks.
663 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); 664 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create();
664 quad->SetNew(shared_quad_state, 665 quad->SetNew(shared_quad_state,
(...skipping 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after
3148 } 3149 }
3149 3150
3150 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3151 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3151 std::vector<PictureLayerImpl*>::iterator it = 3152 std::vector<PictureLayerImpl*>::iterator it =
3152 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3153 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3153 DCHECK(it != picture_layers_.end()); 3154 DCHECK(it != picture_layers_.end());
3154 picture_layers_.erase(it); 3155 picture_layers_.erase(it);
3155 } 3156 }
3156 3157
3157 } // namespace cc 3158 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698