Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 void LayerTreeHost::DidBeginFrame() { | 223 void LayerTreeHost::DidBeginFrame() { |
| 224 client_->DidBeginFrame(); | 224 client_->DidBeginFrame(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 void LayerTreeHost::UpdateAnimations(base::TimeTicks frame_begin_time) { | 227 void LayerTreeHost::UpdateAnimations(base::TimeTicks frame_begin_time) { |
| 228 animating_ = true; | 228 animating_ = true; |
| 229 client_->Animate((frame_begin_time - base::TimeTicks()).InSecondsF()); | 229 client_->Animate((frame_begin_time - base::TimeTicks()).InSecondsF()); |
| 230 AnimateLayers(frame_begin_time); | 230 AnimateLayers(frame_begin_time); |
| 231 animating_ = false; | 231 animating_ = false; |
| 232 | 232 |
| 233 rendering_stats_.numAnimationFrames++; | 233 rendering_stats_.num_animation_frames++; |
| 234 } | 234 } |
| 235 | 235 |
| 236 void LayerTreeHost::DidStopFlinging() { | 236 void LayerTreeHost::DidStopFlinging() { |
| 237 proxy_->MainThreadHasStoppedFlinging(); | 237 proxy_->MainThreadHasStoppedFlinging(); |
| 238 } | 238 } |
| 239 | 239 |
| 240 void LayerTreeHost::Layout() { | 240 void LayerTreeHost::Layout() { |
| 241 client_->Layout(); | 241 client_->Layout(); |
| 242 } | 242 } |
| 243 | 243 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 339 pinch_zoom_scrollbar_vertical_ ? | 339 pinch_zoom_scrollbar_vertical_ ? |
| 340 pinch_zoom_scrollbar_vertical_->id() : Layer::INVALID_ID); | 340 pinch_zoom_scrollbar_vertical_->id() : Layer::INVALID_ID); |
| 341 | 341 |
| 342 if (!settings_.implSidePainting) { | 342 if (!settings_.implSidePainting) { |
| 343 // If we're not in impl-side painting, the tree is immediately | 343 // If we're not in impl-side painting, the tree is immediately |
| 344 // considered active. | 344 // considered active. |
| 345 sync_tree->DidBecomeActive(); | 345 sync_tree->DidBecomeActive(); |
| 346 } | 346 } |
| 347 | 347 |
| 348 if (debug_state_.continuous_painting) | 348 if (debug_state_.continuous_painting) |
| 349 host_impl->SavePaintTime(rendering_stats_.totalPaintTime, commit_number()); | 349 host_impl->SavePaintTime(rendering_stats_.total_paint_time, commit_number()) ; |
|
danakj
2013/03/20 19:00:43
80 col
| |
| 350 | 350 |
| 351 commit_number_++; | 351 commit_number_++; |
| 352 } | 352 } |
| 353 | 353 |
| 354 void LayerTreeHost::SetPinchZoomScrollbarsBoundsAndPosition() { | 354 void LayerTreeHost::SetPinchZoomScrollbarsBoundsAndPosition() { |
| 355 if (!pinch_zoom_scrollbar_horizontal_ || !pinch_zoom_scrollbar_vertical_) | 355 if (!pinch_zoom_scrollbar_horizontal_ || !pinch_zoom_scrollbar_vertical_) |
| 356 return; | 356 return; |
| 357 | 357 |
| 358 gfx::Size size = layout_viewport_size(); | 358 gfx::Size size = layout_viewport_size(); |
| 359 int track_width = PinchZoomScrollbarGeometry::kTrackWidth; | 359 int track_width = PinchZoomScrollbarGeometry::kTrackWidth; |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1021 SetAnimationEventsRecursive(events, | 1021 SetAnimationEventsRecursive(events, |
| 1022 layer->children()[child_index].get(), | 1022 layer->children()[child_index].get(), |
| 1023 wall_clock_time); | 1023 wall_clock_time); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1026 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
| 1027 return proxy_->CapturePicture(); | 1027 return proxy_->CapturePicture(); |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 } // namespace cc | 1030 } // namespace cc |
| OLD | NEW |