| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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.h" | 5 #include "cc/layers/layer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 return false; | 1524 return false; |
| 1525 } | 1525 } |
| 1526 | 1526 |
| 1527 bool Layer::IsSuitableForGpuRasterization() const { | 1527 bool Layer::IsSuitableForGpuRasterization() const { |
| 1528 return true; | 1528 return true; |
| 1529 } | 1529 } |
| 1530 | 1530 |
| 1531 scoped_refptr<base::trace_event::ConvertableToTraceFormat> | 1531 scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
| 1532 Layer::TakeDebugInfo() { | 1532 Layer::TakeDebugInfo() { |
| 1533 if (client_) | 1533 if (client_) |
| 1534 return client_->TakeDebugInfo(this); | 1534 return client_->TakeDebugInfo(); |
| 1535 else | 1535 else |
| 1536 return nullptr; | 1536 return nullptr; |
| 1537 } | 1537 } |
| 1538 | 1538 |
| 1539 void Layer::SetHasRenderSurface(bool has_render_surface) { | 1539 void Layer::SetHasRenderSurface(bool has_render_surface) { |
| 1540 if (has_render_surface_ == has_render_surface) | 1540 if (has_render_surface_ == has_render_surface) |
| 1541 return; | 1541 return; |
| 1542 has_render_surface_ = has_render_surface; | 1542 has_render_surface_ = has_render_surface; |
| 1543 // We do not need SetNeedsCommit here, since this is only ever called | 1543 // We do not need SetNeedsCommit here, since this is only ever called |
| 1544 // during a commit, from CalculateDrawProperties. | 1544 // during a commit, from CalculateDrawProperties. |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1826 this, layer_tree_host_->property_trees()->transform_tree); | 1826 this, layer_tree_host_->property_trees()->transform_tree); |
| 1827 } | 1827 } |
| 1828 | 1828 |
| 1829 gfx::Transform Layer::screen_space_transform() const { | 1829 gfx::Transform Layer::screen_space_transform() const { |
| 1830 DCHECK_NE(transform_tree_index_, -1); | 1830 DCHECK_NE(transform_tree_index_, -1); |
| 1831 return ScreenSpaceTransformFromPropertyTrees( | 1831 return ScreenSpaceTransformFromPropertyTrees( |
| 1832 this, layer_tree_host_->property_trees()->transform_tree); | 1832 this, layer_tree_host_->property_trees()->transform_tree); |
| 1833 } | 1833 } |
| 1834 | 1834 |
| 1835 } // namespace cc | 1835 } // namespace cc |
| OLD | NEW |