| 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/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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Calling paint in WebKit can sometimes cause invalidations, so save | 85 // Calling paint in WebKit can sometimes cause invalidations, so save |
| 86 // off the invalidation prior to calling update. | 86 // off the invalidation prior to calling update. |
| 87 pile_invalidation_.Swap(&pending_invalidation_); | 87 pile_invalidation_.Swap(&pending_invalidation_); |
| 88 pending_invalidation_.Clear(); | 88 pending_invalidation_.Clear(); |
| 89 | 89 |
| 90 gfx::Rect visible_layer_rect = gfx::ScaleToEnclosingRect( | 90 gfx::Rect visible_layer_rect = gfx::ScaleToEnclosingRect( |
| 91 visible_content_rect(), 1.f / contents_scale_x()); | 91 visible_content_rect(), 1.f / contents_scale_x()); |
| 92 devtools_instrumentation::ScopedLayerTask paint_layer( | 92 devtools_instrumentation::ScopedLayerTask paint_layer( |
| 93 devtools_instrumentation::kPaintLayer, id()); | 93 devtools_instrumentation::kPaintLayer, id()); |
| 94 pile_->Update(client_, | 94 pile_->Update(client_, |
| 95 background_color(), | 95 SafeOpaqueBackgroundColor(), |
| 96 pile_invalidation_, | 96 pile_invalidation_, |
| 97 visible_layer_rect, | 97 visible_layer_rect, |
| 98 stats); | 98 stats); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void PictureLayer::SetIsMask(bool is_mask) { | 101 void PictureLayer::SetIsMask(bool is_mask) { |
| 102 is_mask_ = is_mask; | 102 is_mask_ = is_mask; |
| 103 } | 103 } |
| 104 | 104 |
| 105 bool PictureLayer::SupportsLCDText() const { | 105 bool PictureLayer::SupportsLCDText() const { |
| 106 return true; | 106 return true; |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace cc | 109 } // namespace cc |
| OLD | NEW |