OLD | NEW |
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/picture_layer.h" | 5 #include "cc/picture_layer.h" |
6 | 6 |
7 #include "cc/devtools_instrumentation.h" | 7 #include "cc/devtools_instrumentation.h" |
8 #include "cc/layer_tree_impl.h" | 8 #include "cc/layer_tree_impl.h" |
9 #include "cc/picture_layer_impl.h" | 9 #include "cc/picture_layer_impl.h" |
10 #include "ui/gfx/rect_conversions.h" | 10 #include "ui/gfx/rect_conversions.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 pile_->Resize(bounds()); | 72 pile_->Resize(bounds()); |
73 | 73 |
74 // Calling paint in WebKit can sometimes cause invalidations, so save | 74 // Calling paint in WebKit can sometimes cause invalidations, so save |
75 // off the invalidation prior to calling update. | 75 // off the invalidation prior to calling update. |
76 pile_invalidation_.Swap(pending_invalidation_); | 76 pile_invalidation_.Swap(pending_invalidation_); |
77 pending_invalidation_.Clear(); | 77 pending_invalidation_.Clear(); |
78 | 78 |
79 gfx::Rect visible_layer_rect = gfx::ToEnclosingRect( | 79 gfx::Rect visible_layer_rect = gfx::ToEnclosingRect( |
80 gfx::ScaleRect(visibleContentRect(), 1.f / contentsScaleX())); | 80 gfx::ScaleRect(visibleContentRect(), 1.f / contentsScaleX())); |
81 devtools_instrumentation::ScopedPaintLayer paint_layer(id()); | 81 devtools_instrumentation::ScopedPaintLayer paint_layer(id()); |
82 pile_->Update(client_, pile_invalidation_, visible_layer_rect, stats); | 82 pile_->Update(client_, |
| 83 backgroundColor(), |
| 84 pile_invalidation_, |
| 85 visible_layer_rect, |
| 86 stats); |
83 } | 87 } |
84 | 88 |
85 void PictureLayer::setIsMask(bool is_mask) { | 89 void PictureLayer::setIsMask(bool is_mask) { |
86 is_mask_ = is_mask; | 90 is_mask_ = is_mask; |
87 } | 91 } |
88 | 92 |
89 } // namespace cc | 93 } // namespace cc |
OLD | NEW |