| 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 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "cc/layers/layer_impl.h" | 14 #include "cc/layers/layer_impl.h" |
| 15 #include "cc/resources/ui_resource_client.h" | 15 #include "cc/resources/ui_resource_client.h" |
| 16 #include "ui/events/latency_info.h" | 16 #include "ui/events/latency_info.h" |
| 17 #include "ui/gfx/frame_time.h" |
| 17 | 18 |
| 18 #if defined(COMPILER_GCC) | 19 #if defined(COMPILER_GCC) |
| 19 namespace BASE_HASH_NAMESPACE { | 20 namespace BASE_HASH_NAMESPACE { |
| 20 template<> | 21 template<> |
| 21 struct hash<cc::LayerImpl*> { | 22 struct hash<cc::LayerImpl*> { |
| 22 size_t operator()(cc::LayerImpl* ptr) const { | 23 size_t operator()(cc::LayerImpl* ptr) const { |
| 23 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); | 24 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); |
| 24 } | 25 } |
| 25 }; | 26 }; |
| 26 } // namespace BASE_HASH_NAMESPACE | 27 } // namespace BASE_HASH_NAMESPACE |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 PaintTimeCounter* paint_time_counter() const; | 68 PaintTimeCounter* paint_time_counter() const; |
| 68 MemoryHistory* memory_history() const; | 69 MemoryHistory* memory_history() const; |
| 69 bool device_viewport_valid_for_tile_management() const; | 70 bool device_viewport_valid_for_tile_management() const; |
| 70 bool IsActiveTree() const; | 71 bool IsActiveTree() const; |
| 71 bool IsPendingTree() const; | 72 bool IsPendingTree() const; |
| 72 bool IsRecycleTree() const; | 73 bool IsRecycleTree() const; |
| 73 LayerImpl* FindActiveTreeLayerById(int id); | 74 LayerImpl* FindActiveTreeLayerById(int id); |
| 74 LayerImpl* FindPendingTreeLayerById(int id); | 75 LayerImpl* FindPendingTreeLayerById(int id); |
| 75 int MaxTextureSize() const; | 76 int MaxTextureSize() const; |
| 76 bool PinchGestureActive() const; | 77 bool PinchGestureActive() const; |
| 77 base::TimeTicks CurrentFrameTimeTicks() const; | 78 gfx::FrameTime CurrentFrameTimeTicks() const; |
| 78 base::Time CurrentFrameTime() const; | 79 base::Time CurrentFrameTime() const; |
| 79 base::TimeTicks CurrentPhysicalTimeTicks() const; | 80 gfx::FrameTime CurrentPhysicalFrameTime() const; |
| 80 void SetNeedsCommit(); | 81 void SetNeedsCommit(); |
| 81 gfx::Size DrawViewportSize() const; | 82 gfx::Size DrawViewportSize() const; |
| 82 void StartScrollbarAnimation(); | 83 void StartScrollbarAnimation(); |
| 83 | 84 |
| 84 // Tree specific methods exposed to layer-impl tree. | 85 // Tree specific methods exposed to layer-impl tree. |
| 85 // --------------------------------------------------------------------------- | 86 // --------------------------------------------------------------------------- |
| 86 void SetNeedsRedraw(); | 87 void SetNeedsRedraw(); |
| 87 | 88 |
| 88 // TODO(nduca): These are implemented in cc files temporarily, but will become | 89 // TODO(nduca): These are implemented in cc files temporarily, but will become |
| 89 // trivial accessors in a followup patch. | 90 // trivial accessors in a followup patch. |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 270 |
| 270 UIResourceRequestQueue ui_resource_request_queue_; | 271 UIResourceRequestQueue ui_resource_request_queue_; |
| 271 | 272 |
| 272 private: | 273 private: |
| 273 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 274 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 274 }; | 275 }; |
| 275 | 276 |
| 276 } // namespace cc | 277 } // namespace cc |
| 277 | 278 |
| 278 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 279 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |