| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 time_delta); | 163 time_delta); |
| 164 | 164 |
| 165 last_screen_space_transform_ = current_screen_space_transform; | 165 last_screen_space_transform_ = current_screen_space_transform; |
| 166 last_update_time_ = current_time; | 166 last_update_time_ = current_time; |
| 167 last_bounds_ = bounds(); | 167 last_bounds_ = bounds(); |
| 168 last_content_bounds_ = contentBounds(); | 168 last_content_bounds_ = contentBounds(); |
| 169 last_content_scale_x_ = contentsScaleX(); | 169 last_content_scale_x_ = contentsScaleX(); |
| 170 last_content_scale_y_ = contentsScaleY(); | 170 last_content_scale_y_ = contentsScaleY(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 scoped_refptr<PicturePileImpl> PictureLayerImpl::GetPicturePileClone() const { |
| 174 return pile_->CloneForDrawing(); |
| 175 } |
| 176 |
| 173 void PictureLayerImpl::didUpdateBounds() { | 177 void PictureLayerImpl::didUpdateBounds() { |
| 174 if (is_mask_) | 178 if (is_mask_) |
| 175 tilings_.Reset(); | 179 tilings_.Reset(); |
| 176 tilings_.SetLayerBounds(bounds()); | 180 tilings_.SetLayerBounds(bounds()); |
| 177 } | 181 } |
| 178 | 182 |
| 179 scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling, | 183 scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling, |
| 180 gfx::Rect rect) { | 184 gfx::Rect rect) { |
| 181 TileManager* tile_manager = layerTreeImpl()->tile_manager(); | 185 TileManager* tile_manager = layerTreeImpl()->tile_manager(); |
| 182 | 186 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 int max_size = layerTreeImpl()->MaxTextureSize(); | 264 int max_size = layerTreeImpl()->MaxTextureSize(); |
| 261 return gfx::Size( | 265 return gfx::Size( |
| 262 std::min(max_size, contentBounds().width()), | 266 std::min(max_size, contentBounds().width()), |
| 263 std::min(max_size, contentBounds().height())); | 267 std::min(max_size, contentBounds().height())); |
| 264 } | 268 } |
| 265 | 269 |
| 266 return layerTreeImpl()->settings().defaultTileSize; | 270 return layerTreeImpl()->settings().defaultTileSize; |
| 267 } | 271 } |
| 268 | 272 |
| 269 } // namespace cc | 273 } // namespace cc |
| OLD | NEW |