| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "ui/gfx/transform.h" | 35 #include "ui/gfx/transform.h" |
| 36 | 36 |
| 37 namespace base { | 37 namespace base { |
| 38 class DictionaryValue; | 38 class DictionaryValue; |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace cc { | 41 namespace cc { |
| 42 | 42 |
| 43 class LayerTreeHostImpl; | 43 class LayerTreeHostImpl; |
| 44 class LayerTreeImpl; | 44 class LayerTreeImpl; |
| 45 class MicroBenchmarkImpl; |
| 45 class QuadSink; | 46 class QuadSink; |
| 46 class Renderer; | 47 class Renderer; |
| 47 class ScrollbarAnimationController; | 48 class ScrollbarAnimationController; |
| 48 class ScrollbarLayerImplBase; | 49 class ScrollbarLayerImplBase; |
| 49 class Layer; | 50 class Layer; |
| 50 | 51 |
| 51 struct AppendQuadsData; | 52 struct AppendQuadsData; |
| 52 | 53 |
| 53 enum DrawMode { | 54 enum DrawMode { |
| 54 DRAW_MODE_NONE, | 55 DRAW_MODE_NONE, |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); | 484 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); |
| 484 virtual void PushPropertiesTo(LayerImpl* layer); | 485 virtual void PushPropertiesTo(LayerImpl* layer); |
| 485 | 486 |
| 486 scoped_ptr<base::Value> AsValue() const; | 487 scoped_ptr<base::Value> AsValue() const; |
| 487 virtual size_t GPUMemoryUsageInBytes() const; | 488 virtual size_t GPUMemoryUsageInBytes() const; |
| 488 | 489 |
| 489 // TODO(danakj): Be true only if needed. crbug.com/259511 | 490 // TODO(danakj): Be true only if needed. crbug.com/259511 |
| 490 bool needs_push_properties() const { return true; } | 491 bool needs_push_properties() const { return true; } |
| 491 bool descendant_needs_push_properties() const { return true; } | 492 bool descendant_needs_push_properties() const { return true; } |
| 492 | 493 |
| 494 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark); |
| 495 |
| 493 protected: | 496 protected: |
| 494 LayerImpl(LayerTreeImpl* layer_impl, int id); | 497 LayerImpl(LayerTreeImpl* layer_impl, int id); |
| 495 | 498 |
| 496 // Get the color and size of the layer's debug border. | 499 // Get the color and size of the layer's debug border. |
| 497 virtual void GetDebugBorderProperties(SkColor* color, float* width) const; | 500 virtual void GetDebugBorderProperties(SkColor* color, float* width) const; |
| 498 | 501 |
| 499 void AppendDebugBorderQuad(QuadSink* quad_sink, | 502 void AppendDebugBorderQuad(QuadSink* quad_sink, |
| 500 const SharedQuadState* shared_quad_state, | 503 const SharedQuadState* shared_quad_state, |
| 501 AppendQuadsData* append_quads_data) const; | 504 AppendQuadsData* append_quads_data) const; |
| 502 void AppendDebugBorderQuad(QuadSink* quad_sink, | 505 void AppendDebugBorderQuad(QuadSink* quad_sink, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 // Group of properties that need to be computed based on the layer tree | 630 // Group of properties that need to be computed based on the layer tree |
| 628 // hierarchy before layers can be drawn. | 631 // hierarchy before layers can be drawn. |
| 629 DrawProperties<LayerImpl> draw_properties_; | 632 DrawProperties<LayerImpl> draw_properties_; |
| 630 | 633 |
| 631 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 634 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 632 }; | 635 }; |
| 633 | 636 |
| 634 } // namespace cc | 637 } // namespace cc |
| 635 | 638 |
| 636 #endif // CC_LAYERS_LAYER_IMPL_H_ | 639 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |