| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "cc/animation/layer_animation_controller.h" | 14 #include "cc/animation/layer_animation_controller.h" |
| 15 #include "cc/animation/layer_animation_value_observer.h" | 15 #include "cc/animation/layer_animation_value_observer.h" |
| 16 #include "cc/base/cc_export.h" | 16 #include "cc/base/cc_export.h" |
| 17 #include "cc/base/region.h" | 17 #include "cc/base/region.h" |
| 18 #include "cc/base/scoped_ptr_vector.h" | 18 #include "cc/base/scoped_ptr_vector.h" |
| 19 #include "cc/input/input_handler.h" | 19 #include "cc/input/input_handler.h" |
| 20 #include "cc/layers/draw_properties.h" | 20 #include "cc/layers/draw_properties.h" |
| 21 #include "cc/layers/layer_lists.h" | 21 #include "cc/layers/layer_lists.h" |
| 22 #include "cc/layers/layer_position_constraint.h" | 22 #include "cc/layers/layer_position_constraint.h" |
| 23 #include "cc/layers/render_surface_impl.h" | 23 #include "cc/layers/render_surface_impl.h" |
| 24 #include "cc/quads/render_pass.h" | 24 #include "cc/quads/render_pass.h" |
| 25 #include "cc/quads/shared_quad_state.h" | 25 #include "cc/quads/shared_quad_state.h" |
| 26 #include "cc/resources/resource_provider.h" | 26 #include "cc/resources/resource_provider.h" |
| 27 #include "skia/ext/refptr.h" | 27 #include "skia/ext/refptr.h" |
| 28 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositingReaso
ns.h" |
| 28 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" | 29 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" |
| 29 #include "third_party/skia/include/core/SkColor.h" | 30 #include "third_party/skia/include/core/SkColor.h" |
| 30 #include "third_party/skia/include/core/SkImageFilter.h" | 31 #include "third_party/skia/include/core/SkImageFilter.h" |
| 31 #include "third_party/skia/include/core/SkPicture.h" | 32 #include "third_party/skia/include/core/SkPicture.h" |
| 32 #include "ui/gfx/rect.h" | 33 #include "ui/gfx/rect.h" |
| 33 #include "ui/gfx/rect_f.h" | 34 #include "ui/gfx/rect_f.h" |
| 34 #include "ui/gfx/transform.h" | 35 #include "ui/gfx/transform.h" |
| 35 | 36 |
| 36 namespace base { | 37 namespace base { |
| 37 class DictionaryValue; | 38 class DictionaryValue; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 199 |
| 199 void SetSublayerTransform(const gfx::Transform& sublayer_transform); | 200 void SetSublayerTransform(const gfx::Transform& sublayer_transform); |
| 200 const gfx::Transform& sublayer_transform() const { | 201 const gfx::Transform& sublayer_transform() const { |
| 201 return sublayer_transform_; | 202 return sublayer_transform_; |
| 202 } | 203 } |
| 203 | 204 |
| 204 // Debug layer name. | 205 // Debug layer name. |
| 205 void SetDebugName(const std::string& debug_name) { debug_name_ = debug_name; } | 206 void SetDebugName(const std::string& debug_name) { debug_name_ = debug_name; } |
| 206 std::string debug_name() const { return debug_name_; } | 207 std::string debug_name() const { return debug_name_; } |
| 207 | 208 |
| 209 void SetCompositingReasons(WebKit::WebCompositingReasons reasons) { |
| 210 compositing_reasons_ = reasons; |
| 211 } |
| 212 WebKit::WebCompositingReasons compositing_reasons() const { |
| 213 return compositing_reasons_; |
| 214 } |
| 215 |
| 208 bool ShowDebugBorders() const; | 216 bool ShowDebugBorders() const; |
| 209 | 217 |
| 210 // These invalidate the host's render surface layer list. The caller | 218 // These invalidate the host's render surface layer list. The caller |
| 211 // is responsible for calling set_needs_update_draw_properties on the tree | 219 // is responsible for calling set_needs_update_draw_properties on the tree |
| 212 // so that its list can be recreated. | 220 // so that its list can be recreated. |
| 213 void CreateRenderSurface(); | 221 void CreateRenderSurface(); |
| 214 void ClearRenderSurface(); | 222 void ClearRenderSurface(); |
| 215 | 223 |
| 216 DrawProperties<LayerImpl, RenderSurfaceImpl>& draw_properties() { | 224 DrawProperties<LayerImpl, RenderSurfaceImpl>& draw_properties() { |
| 217 return draw_properties_; | 225 return draw_properties_; |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 gfx::Vector2d sent_scroll_delta_; | 515 gfx::Vector2d sent_scroll_delta_; |
| 508 gfx::Vector2d max_scroll_offset_; | 516 gfx::Vector2d max_scroll_offset_; |
| 509 gfx::Vector2dF last_scroll_offset_; | 517 gfx::Vector2dF last_scroll_offset_; |
| 510 | 518 |
| 511 // The global depth value of the center of the layer. This value is used | 519 // The global depth value of the center of the layer. This value is used |
| 512 // to sort layers from back to front. | 520 // to sort layers from back to front. |
| 513 float draw_depth_; | 521 float draw_depth_; |
| 514 | 522 |
| 515 // Debug layer name. | 523 // Debug layer name. |
| 516 std::string debug_name_; | 524 std::string debug_name_; |
| 525 WebKit::WebCompositingReasons compositing_reasons_; |
| 517 | 526 |
| 518 WebKit::WebFilterOperations filters_; | 527 WebKit::WebFilterOperations filters_; |
| 519 WebKit::WebFilterOperations background_filters_; | 528 WebKit::WebFilterOperations background_filters_; |
| 520 skia::RefPtr<SkImageFilter> filter_; | 529 skia::RefPtr<SkImageFilter> filter_; |
| 521 | 530 |
| 522 #ifndef NDEBUG | 531 #ifndef NDEBUG |
| 523 bool between_will_draw_and_did_draw_; | 532 bool between_will_draw_and_did_draw_; |
| 524 #endif | 533 #endif |
| 525 | 534 |
| 526 // Rect indicating what was repainted/updated during update. | 535 // Rect indicating what was repainted/updated during update. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 544 // Group of properties that need to be computed based on the layer tree | 553 // Group of properties that need to be computed based on the layer tree |
| 545 // hierarchy before layers can be drawn. | 554 // hierarchy before layers can be drawn. |
| 546 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 555 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
| 547 | 556 |
| 548 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 557 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 549 }; | 558 }; |
| 550 | 559 |
| 551 } // namespace cc | 560 } // namespace cc |
| 552 | 561 |
| 553 #endif // CC_LAYERS_LAYER_IMPL_H_ | 562 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |