| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 218 |
| 219 gfx::Rect viewport_in_content_space; | 219 gfx::Rect viewport_in_content_space; |
| 220 gfx::Transform screenToLayer(gfx::Transform::kSkipInitialization); | 220 gfx::Transform screenToLayer(gfx::Transform::kSkipInitialization); |
| 221 if (screenSpaceTransform().GetInverse(&screenToLayer)) { | 221 if (screenSpaceTransform().GetInverse(&screenToLayer)) { |
| 222 gfx::Rect device_viewport(layerTreeImpl()->device_viewport_size()); | 222 gfx::Rect device_viewport(layerTreeImpl()->device_viewport_size()); |
| 223 viewport_in_content_space = gfx::ToEnclosingRect( | 223 viewport_in_content_space = gfx::ToEnclosingRect( |
| 224 MathUtil::projectClippedRect(screenToLayer, device_viewport)); | 224 MathUtil::projectClippedRect(screenToLayer, device_viewport)); |
| 225 } | 225 } |
| 226 | 226 |
| 227 WhichTree tree = layerTreeImpl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; | 227 WhichTree tree = layerTreeImpl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; |
| 228 bool store_screen_space_quads_on_tiles = |
| 229 layerTreeImpl()->debug_state().traceAllRenderedFrames; |
| 228 tilings_->UpdateTilePriorities( | 230 tilings_->UpdateTilePriorities( |
| 229 tree, | 231 tree, |
| 230 layerTreeImpl()->device_viewport_size(), | 232 layerTreeImpl()->device_viewport_size(), |
| 231 viewport_in_content_space, | 233 viewport_in_content_space, |
| 232 last_bounds_, | 234 last_bounds_, |
| 233 bounds(), | 235 bounds(), |
| 234 last_content_bounds_, | 236 last_content_bounds_, |
| 235 contentBounds(), | 237 contentBounds(), |
| 236 last_content_scale_, | 238 last_content_scale_, |
| 237 contentsScaleX(), | 239 contentsScaleX(), |
| 238 last_screen_space_transform_, | 240 last_screen_space_transform_, |
| 239 current_screen_space_transform, | 241 current_screen_space_transform, |
| 240 current_source_frame_number, | 242 current_source_frame_number, |
| 241 current_frame_time); | 243 current_frame_time, |
| 244 store_screen_space_quads_on_tiles); |
| 242 | 245 |
| 243 last_screen_space_transform_ = current_screen_space_transform; | 246 last_screen_space_transform_ = current_screen_space_transform; |
| 244 last_bounds_ = bounds(); | 247 last_bounds_ = bounds(); |
| 245 last_content_bounds_ = contentBounds(); | 248 last_content_bounds_ = contentBounds(); |
| 246 last_content_scale_ = contentsScaleX(); | 249 last_content_scale_ = contentsScaleX(); |
| 247 } | 250 } |
| 248 | 251 |
| 249 void PictureLayerImpl::didBecomeActive() { | 252 void PictureLayerImpl::didBecomeActive() { |
| 250 LayerImpl::didBecomeActive(); | 253 LayerImpl::didBecomeActive(); |
| 251 tilings_->DidBecomeActive(); | 254 tilings_->DidBecomeActive(); |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 return twin; | 716 return twin; |
| 714 } | 717 } |
| 715 | 718 |
| 716 void PictureLayerImpl::getDebugBorderProperties( | 719 void PictureLayerImpl::getDebugBorderProperties( |
| 717 SkColor* color, float* width) const { | 720 SkColor* color, float* width) const { |
| 718 *color = DebugColors::TiledContentLayerBorderColor(); | 721 *color = DebugColors::TiledContentLayerBorderColor(); |
| 719 *width = DebugColors::TiledContentLayerBorderWidth(layerTreeImpl()); | 722 *width = DebugColors::TiledContentLayerBorderWidth(layerTreeImpl()); |
| 720 } | 723 } |
| 721 | 724 |
| 722 } // namespace cc | 725 } // namespace cc |
| OLD | NEW |