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

Side by Side Diff: cc/layers/picture_layer.cc

Issue 13975019: Merge 194269 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1479/src/
Patch Set: Created 7 years, 8 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/layers/paint_properties.h ('k') | cc/layers/scrollbar_layer_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 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/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "cc/debug/devtools_instrumentation.h" 7 #include "cc/debug/devtools_instrumentation.h"
8 #include "cc/layers/picture_layer_impl.h" 8 #include "cc/layers/picture_layer_impl.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 #include "ui/gfx/rect_conversions.h" 10 #include "ui/gfx/rect_conversions.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 Layer::SetNeedsDisplayRect(layer_rect); 69 Layer::SetNeedsDisplayRect(layer_rect);
70 } 70 }
71 71
72 void PictureLayer::Update(ResourceUpdateQueue*, 72 void PictureLayer::Update(ResourceUpdateQueue*,
73 const OcclusionTracker*, 73 const OcclusionTracker*,
74 RenderingStats* stats) { 74 RenderingStats* stats) {
75 // Do not early-out of this function so that PicturePile::Update has a chance 75 // Do not early-out of this function so that PicturePile::Update has a chance
76 // to record pictures due to changing visibility of this layer. 76 // to record pictures due to changing visibility of this layer.
77 77
78 pile_->Resize(bounds()); 78 pile_->Resize(paint_properties().bounds);
79 79
80 // Calling paint in WebKit can sometimes cause invalidations, so save 80 // Calling paint in WebKit can sometimes cause invalidations, so save
81 // off the invalidation prior to calling update. 81 // off the invalidation prior to calling update.
82 pile_invalidation_.Swap(&pending_invalidation_); 82 pile_invalidation_.Swap(&pending_invalidation_);
83 pending_invalidation_.Clear(); 83 pending_invalidation_.Clear();
84 84
85 gfx::Rect visible_layer_rect = gfx::ToEnclosingRect( 85 gfx::Rect visible_layer_rect = gfx::ToEnclosingRect(
86 gfx::ScaleRect(visible_content_rect(), 1.f / contents_scale_x())); 86 gfx::ScaleRect(visible_content_rect(), 1.f / contents_scale_x()));
87 devtools_instrumentation::ScopedPaintLayer paint_layer(id()); 87 devtools_instrumentation::ScopedPaintLayer paint_layer(id());
88 pile_->Update(client_, 88 pile_->Update(client_,
89 background_color(), 89 background_color(),
90 pile_invalidation_, 90 pile_invalidation_,
91 visible_layer_rect, 91 visible_layer_rect,
92 stats); 92 stats);
93 } 93 }
94 94
95 void PictureLayer::SetIsMask(bool is_mask) { 95 void PictureLayer::SetIsMask(bool is_mask) {
96 is_mask_ = is_mask; 96 is_mask_ = is_mask;
97 } 97 }
98 98
99 } // namespace cc 99 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/paint_properties.h ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698