| 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_LAYER_IMPL_H_ | 5 #ifndef CC_LAYER_IMPL_H_ |
| 6 #define CC_LAYER_IMPL_H_ | 6 #define CC_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/values.h" |
| 12 #include "cc/cc_export.h" | 13 #include "cc/cc_export.h" |
| 13 #include "cc/draw_properties.h" | 14 #include "cc/draw_properties.h" |
| 14 #include "cc/input_handler.h" | 15 #include "cc/input_handler.h" |
| 15 #include "cc/layer_animation_controller.h" | 16 #include "cc/layer_animation_controller.h" |
| 16 #include "cc/layer_animation_value_observer.h" | 17 #include "cc/layer_animation_value_observer.h" |
| 17 #include "cc/region.h" | 18 #include "cc/region.h" |
| 18 #include "cc/render_pass.h" | 19 #include "cc/render_pass.h" |
| 19 #include "cc/render_surface_impl.h" | 20 #include "cc/render_surface_impl.h" |
| 20 #include "cc/resource_provider.h" | 21 #include "cc/resource_provider.h" |
| 21 #include "cc/scoped_ptr_vector.h" | 22 #include "cc/scoped_ptr_vector.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 303 |
| 303 virtual skia::RefPtr<SkPicture> getPicture(); | 304 virtual skia::RefPtr<SkPicture> getPicture(); |
| 304 | 305 |
| 305 virtual bool canClipSelf() const; | 306 virtual bool canClipSelf() const; |
| 306 | 307 |
| 307 virtual bool areVisibleResourcesReady() const; | 308 virtual bool areVisibleResourcesReady() const; |
| 308 | 309 |
| 309 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl*); | 310 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl*); |
| 310 virtual void pushPropertiesTo(LayerImpl*); | 311 virtual void pushPropertiesTo(LayerImpl*); |
| 311 | 312 |
| 313 virtual scoped_ptr<base::Value> AsValue() const; |
| 314 |
| 312 protected: | 315 protected: |
| 313 LayerImpl(LayerTreeImpl* layerImpl, int); | 316 LayerImpl(LayerTreeImpl* layerImpl, int); |
| 314 | 317 |
| 315 // Get the color and size of the layer's debug border. | 318 // Get the color and size of the layer's debug border. |
| 316 virtual void getDebugBorderProperties(SkColor*, float* width) const; | 319 virtual void getDebugBorderProperties(SkColor*, float* width) const; |
| 317 | 320 |
| 318 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; | 321 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; |
| 319 | 322 |
| 320 virtual void dumpLayerProperties(std::string*, int indent) const; | 323 virtual void dumpLayerProperties(std::string*, int indent) const; |
| 321 static std::string indentString(int indent); | 324 static std::string indentString(int indent); |
| 322 | 325 |
| 326 void AsValueInto(base::DictionaryValue* dict) const; |
| 327 |
| 323 private: | 328 private: |
| 324 void updateScrollbarPositions(); | 329 void updateScrollbarPositions(); |
| 325 | 330 |
| 326 void noteLayerSurfacePropertyChanged(); | 331 void noteLayerSurfacePropertyChanged(); |
| 327 void noteLayerPropertyChanged(); | 332 void noteLayerPropertyChanged(); |
| 328 void noteLayerPropertyChangedForSubtree(); | 333 void noteLayerPropertyChangedForSubtree(); |
| 329 | 334 |
| 330 // Note carefully this does not affect the current layer. | 335 // Note carefully this does not affect the current layer. |
| 331 void noteLayerPropertyChangedForDescendants(); | 336 void noteLayerPropertyChangedForDescendants(); |
| 332 | 337 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 // Group of properties that need to be computed based on the layer tree | 433 // Group of properties that need to be computed based on the layer tree |
| 429 // hierarchy before layers can be drawn. | 434 // hierarchy before layers can be drawn. |
| 430 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; | 435 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; |
| 431 | 436 |
| 432 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 437 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 433 }; | 438 }; |
| 434 | 439 |
| 435 } | 440 } |
| 436 | 441 |
| 437 #endif // CC_LAYER_IMPL_H_ | 442 #endif // CC_LAYER_IMPL_H_ |
| OLD | NEW |