| 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/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/debug/trace_event_argument.h" | 8 #include "base/debug/trace_event_argument.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 void LayerImpl::ClearRenderSurface() { | 248 void LayerImpl::ClearRenderSurface() { |
| 249 draw_properties_.render_surface = nullptr; | 249 draw_properties_.render_surface = nullptr; |
| 250 } | 250 } |
| 251 | 251 |
| 252 void LayerImpl::ClearRenderSurfaceLayerList() { | 252 void LayerImpl::ClearRenderSurfaceLayerList() { |
| 253 if (draw_properties_.render_surface) | 253 if (draw_properties_.render_surface) |
| 254 draw_properties_.render_surface->layer_list().clear(); | 254 draw_properties_.render_surface->layer_list().clear(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 void LayerImpl::PopulateSharedQuadState(SharedQuadState* state) const { | 257 void LayerImpl::PopulateSharedQuadState(SharedQuadState* state) const { |
| 258 state->SetAll(draw_properties_.target_space_transform, | 258 state->SetAll( |
| 259 draw_properties_.content_bounds, | 259 draw_properties_.target_space_transform, draw_properties_.content_bounds, |
| 260 draw_properties_.visible_content_rect, | 260 draw_properties_.visible_content_rect, draw_properties_.clip_rect, |
| 261 draw_properties_.clip_rect, | 261 draw_properties_.is_clipped, draw_properties_.opacity, |
| 262 draw_properties_.is_clipped, | 262 draw_properties_.blend_mode, sorting_context_id_); |
| 263 draw_properties_.opacity, | |
| 264 blend_mode_, | |
| 265 sorting_context_id_); | |
| 266 } | 263 } |
| 267 | 264 |
| 268 bool LayerImpl::WillDraw(DrawMode draw_mode, | 265 bool LayerImpl::WillDraw(DrawMode draw_mode, |
| 269 ResourceProvider* resource_provider) { | 266 ResourceProvider* resource_provider) { |
| 270 // WillDraw/DidDraw must be matched. | 267 // WillDraw/DidDraw must be matched. |
| 271 DCHECK_NE(DRAW_MODE_NONE, draw_mode); | 268 DCHECK_NE(DRAW_MODE_NONE, draw_mode); |
| 272 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_); | 269 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_); |
| 273 current_draw_mode_ = draw_mode; | 270 current_draw_mode_ = draw_mode; |
| 274 return true; | 271 return true; |
| 275 } | 272 } |
| (...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 | 1589 |
| 1593 void LayerImpl::NotifyAnimationFinished( | 1590 void LayerImpl::NotifyAnimationFinished( |
| 1594 base::TimeTicks monotonic_time, | 1591 base::TimeTicks monotonic_time, |
| 1595 Animation::TargetProperty target_property, | 1592 Animation::TargetProperty target_property, |
| 1596 int group) { | 1593 int group) { |
| 1597 if (target_property == Animation::ScrollOffset) | 1594 if (target_property == Animation::ScrollOffset) |
| 1598 layer_tree_impl_->InputScrollAnimationFinished(); | 1595 layer_tree_impl_->InputScrollAnimationFinished(); |
| 1599 } | 1596 } |
| 1600 | 1597 |
| 1601 } // namespace cc | 1598 } // namespace cc |
| OLD | NEW |