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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(draw_properties_.target_space_transform, |
259 draw_properties_.content_bounds, | 259 draw_properties_.content_bounds, |
260 draw_properties_.visible_content_rect, | 260 draw_properties_.visible_content_rect, |
261 draw_properties_.clip_rect, | 261 draw_properties_.clip_rect, |
262 draw_properties_.is_clipped, | 262 draw_properties_.is_clipped, |
263 draw_properties_.opacity, | 263 draw_properties_.opacity, |
264 blend_mode_, | 264 draw_properties_.blend_mode, |
265 sorting_context_id_); | 265 sorting_context_id_); |
266 } | 266 } |
267 | 267 |
268 bool LayerImpl::WillDraw(DrawMode draw_mode, | 268 bool LayerImpl::WillDraw(DrawMode draw_mode, |
269 ResourceProvider* resource_provider) { | 269 ResourceProvider* resource_provider) { |
270 // WillDraw/DidDraw must be matched. | 270 // WillDraw/DidDraw must be matched. |
271 DCHECK_NE(DRAW_MODE_NONE, draw_mode); | 271 DCHECK_NE(DRAW_MODE_NONE, draw_mode); |
272 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_); | 272 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_); |
273 current_draw_mode_ = draw_mode; | 273 current_draw_mode_ = draw_mode; |
274 return true; | 274 return true; |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 } | 1538 } |
1539 | 1539 |
1540 void LayerImpl::NotifyAnimationFinished( | 1540 void LayerImpl::NotifyAnimationFinished( |
1541 base::TimeTicks monotonic_time, | 1541 base::TimeTicks monotonic_time, |
1542 Animation::TargetProperty target_property) { | 1542 Animation::TargetProperty target_property) { |
1543 if (target_property == Animation::ScrollOffset) | 1543 if (target_property == Animation::ScrollOffset) |
1544 layer_tree_impl_->InputScrollAnimationFinished(); | 1544 layer_tree_impl_->InputScrollAnimationFinished(); |
1545 } | 1545 } |
1546 | 1546 |
1547 } // namespace cc | 1547 } // namespace cc |
OLD | NEW |