| 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/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "cc/animation/animation_registrar.h" | 10 #include "cc/animation/animation_registrar.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 DCHECK(!draw_properties_.render_surface); | 233 DCHECK(!draw_properties_.render_surface); |
| 234 draw_properties_.render_surface = | 234 draw_properties_.render_surface = |
| 235 make_scoped_ptr(new RenderSurfaceImpl(this)); | 235 make_scoped_ptr(new RenderSurfaceImpl(this)); |
| 236 draw_properties_.render_target = this; | 236 draw_properties_.render_target = this; |
| 237 } | 237 } |
| 238 | 238 |
| 239 void LayerImpl::ClearRenderSurface() { | 239 void LayerImpl::ClearRenderSurface() { |
| 240 draw_properties_.render_surface.reset(); | 240 draw_properties_.render_surface.reset(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void LayerImpl::ClearRenderSurfaceLayerList() { |
| 244 if (draw_properties_.render_surface) |
| 245 draw_properties_.render_surface->layer_list().clear(); |
| 246 } |
| 247 |
| 243 scoped_ptr<SharedQuadState> LayerImpl::CreateSharedQuadState() const { | 248 scoped_ptr<SharedQuadState> LayerImpl::CreateSharedQuadState() const { |
| 244 scoped_ptr<SharedQuadState> state = SharedQuadState::Create(); | 249 scoped_ptr<SharedQuadState> state = SharedQuadState::Create(); |
| 245 state->SetAll(draw_properties_.target_space_transform, | 250 state->SetAll(draw_properties_.target_space_transform, |
| 246 draw_properties_.content_bounds, | 251 draw_properties_.content_bounds, |
| 247 draw_properties_.visible_content_rect, | 252 draw_properties_.visible_content_rect, |
| 248 draw_properties_.clip_rect, | 253 draw_properties_.clip_rect, |
| 249 draw_properties_.is_clipped, | 254 draw_properties_.is_clipped, |
| 250 draw_properties_.opacity, | 255 draw_properties_.opacity, |
| 251 blend_mode_); | 256 blend_mode_); |
| 252 return state.Pass(); | 257 return state.Pass(); |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 scoped_ptr<base::Value> LayerImpl::AsValue() const { | 1531 scoped_ptr<base::Value> LayerImpl::AsValue() const { |
| 1527 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1532 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
| 1528 AsValueInto(state.get()); | 1533 AsValueInto(state.get()); |
| 1529 return state.PassAs<base::Value>(); | 1534 return state.PassAs<base::Value>(); |
| 1530 } | 1535 } |
| 1531 | 1536 |
| 1532 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { | 1537 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { |
| 1533 benchmark->RunOnLayer(this); | 1538 benchmark->RunOnLayer(this); |
| 1534 } | 1539 } |
| 1535 } // namespace cc | 1540 } // namespace cc |
| OLD | NEW |