| 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_impl.h" | 5 #include "cc/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/time.h" | 7 #include "base/time.h" |
| 8 #include "cc/append_quads_data.h" | 8 #include "cc/append_quads_data.h" |
| 9 #include "cc/checkerboard_draw_quad.h" | 9 #include "cc/checkerboard_draw_quad.h" |
| 10 #include "cc/debug_border_draw_quad.h" | 10 #include "cc/debug_border_draw_quad.h" |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 continue; | 414 continue; |
| 415 gfx::Rect layer_rect = pile_->tile_bounds(x, y); | 415 gfx::Rect layer_rect = pile_->tile_bounds(x, y); |
| 416 tilings_->CreateTilesFromLayerRect(layer_rect); | 416 tilings_->CreateTilesFromLayerRect(layer_rect); |
| 417 } | 417 } |
| 418 } | 418 } |
| 419 } | 419 } |
| 420 | 420 |
| 421 void PictureLayerImpl::SyncTiling( | 421 void PictureLayerImpl::SyncTiling( |
| 422 const PictureLayerTiling* tiling, | 422 const PictureLayerTiling* tiling, |
| 423 const Region& pending_layer_invalidation) { | 423 const Region& pending_layer_invalidation) { |
| 424 if (!drawsContent()) |
| 425 return; |
| 424 tilings_->Clone(tiling, pending_layer_invalidation); | 426 tilings_->Clone(tiling, pending_layer_invalidation); |
| 425 } | 427 } |
| 426 | 428 |
| 427 void PictureLayerImpl::SetIsMask(bool is_mask) { | 429 void PictureLayerImpl::SetIsMask(bool is_mask) { |
| 428 if (is_mask_ == is_mask) | 430 if (is_mask_ == is_mask) |
| 429 return; | 431 return; |
| 430 is_mask_ = is_mask; | 432 is_mask_ = is_mask; |
| 431 if (tilings_) | 433 if (tilings_) |
| 432 tilings_->RemoveAllTiles(); | 434 tilings_->RemoveAllTiles(); |
| 433 } | 435 } |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 return twin; | 729 return twin; |
| 728 } | 730 } |
| 729 | 731 |
| 730 void PictureLayerImpl::getDebugBorderProperties( | 732 void PictureLayerImpl::getDebugBorderProperties( |
| 731 SkColor* color, float* width) const { | 733 SkColor* color, float* width) const { |
| 732 *color = DebugColors::TiledContentLayerBorderColor(); | 734 *color = DebugColors::TiledContentLayerBorderColor(); |
| 733 *width = DebugColors::TiledContentLayerBorderWidth(layerTreeImpl()); | 735 *width = DebugColors::TiledContentLayerBorderWidth(layerTreeImpl()); |
| 734 } | 736 } |
| 735 | 737 |
| 736 } // namespace cc | 738 } // namespace cc |
| OLD | NEW |