| 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 "cc/cc_export.h" | 12 #include "cc/cc_export.h" |
| 13 #include "cc/input_handler.h" | 13 #include "cc/input_handler.h" |
| 14 #include "cc/layer_animation_controller.h" | 14 #include "cc/layer_animation_controller.h" |
| 15 #include "cc/region.h" | 15 #include "cc/region.h" |
| 16 #include "cc/render_pass.h" | 16 #include "cc/render_pass.h" |
| 17 #include "cc/render_surface_impl.h" | 17 #include "cc/render_surface_impl.h" |
| 18 #include "cc/resource_provider.h" | 18 #include "cc/resource_provider.h" |
| 19 #include "cc/scoped_ptr_vector.h" | 19 #include "cc/scoped_ptr_vector.h" |
| 20 #include "cc/shared_quad_state.h" | 20 #include "cc/shared_quad_state.h" |
| 21 #include "third_party/skia/include/core/SkColor.h" | 21 #include "third_party/skia/include/core/SkColor.h" |
| 22 #include "third_party/skia/include/core/SkImageFilter.h" |
| 23 #include "third_party/skia/include/core/SkRefCnt.h" |
| 22 #include "ui/gfx/rect.h" | 24 #include "ui/gfx/rect.h" |
| 23 #include "ui/gfx/rect_f.h" | 25 #include "ui/gfx/rect_f.h" |
| 24 #include <public/WebFilterOperations.h> | 26 #include <public/WebFilterOperations.h> |
| 25 #include <public/WebTransformationMatrix.h> | 27 #include <public/WebTransformationMatrix.h> |
| 26 | 28 |
| 27 namespace cc { | 29 namespace cc { |
| 28 | 30 |
| 29 class LayerSorter; | 31 class LayerSorter; |
| 30 class LayerTreeHostImpl; | 32 class LayerTreeHostImpl; |
| 31 class QuadSink; | 33 class QuadSink; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 110 |
| 109 void setBackgroundColor(SkColor); | 111 void setBackgroundColor(SkColor); |
| 110 SkColor backgroundColor() const { return m_backgroundColor; } | 112 SkColor backgroundColor() const { return m_backgroundColor; } |
| 111 | 113 |
| 112 void setFilters(const WebKit::WebFilterOperations&); | 114 void setFilters(const WebKit::WebFilterOperations&); |
| 113 const WebKit::WebFilterOperations& filters() const { return m_filters; } | 115 const WebKit::WebFilterOperations& filters() const { return m_filters; } |
| 114 | 116 |
| 115 void setBackgroundFilters(const WebKit::WebFilterOperations&); | 117 void setBackgroundFilters(const WebKit::WebFilterOperations&); |
| 116 const WebKit::WebFilterOperations& backgroundFilters() const { return m_back
groundFilters; } | 118 const WebKit::WebFilterOperations& backgroundFilters() const { return m_back
groundFilters; } |
| 117 | 119 |
| 118 void setFilter(SkImageFilter*); | 120 void setFilter(const SkRefPtr<SkImageFilter>&); |
| 119 SkImageFilter* filter() const { return m_filter; } | 121 SkRefPtr<SkImageFilter> filter() const { return m_filter; } |
| 120 | 122 |
| 121 void setMasksToBounds(bool); | 123 void setMasksToBounds(bool); |
| 122 bool masksToBounds() const { return m_masksToBounds; } | 124 bool masksToBounds() const { return m_masksToBounds; } |
| 123 | 125 |
| 124 void setContentsOpaque(bool); | 126 void setContentsOpaque(bool); |
| 125 bool contentsOpaque() const { return m_contentsOpaque; } | 127 bool contentsOpaque() const { return m_contentsOpaque; } |
| 126 | 128 |
| 127 void setOpacity(float); | 129 void setOpacity(float); |
| 128 bool opacityIsAnimating() const; | 130 bool opacityIsAnimating() const; |
| 129 | 131 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 // to sort layers from back to front. | 378 // to sort layers from back to front. |
| 377 float m_drawDepth; | 379 float m_drawDepth; |
| 378 float m_drawOpacity; | 380 float m_drawOpacity; |
| 379 bool m_drawOpacityIsAnimating; | 381 bool m_drawOpacityIsAnimating; |
| 380 | 382 |
| 381 // Debug layer name. | 383 // Debug layer name. |
| 382 std::string m_debugName; | 384 std::string m_debugName; |
| 383 | 385 |
| 384 WebKit::WebFilterOperations m_filters; | 386 WebKit::WebFilterOperations m_filters; |
| 385 WebKit::WebFilterOperations m_backgroundFilters; | 387 WebKit::WebFilterOperations m_backgroundFilters; |
| 386 SkImageFilter* m_filter; | 388 SkRefPtr<SkImageFilter> m_filter; |
| 387 | 389 |
| 388 WebKit::WebTransformationMatrix m_drawTransform; | 390 WebKit::WebTransformationMatrix m_drawTransform; |
| 389 WebKit::WebTransformationMatrix m_screenSpaceTransform; | 391 WebKit::WebTransformationMatrix m_screenSpaceTransform; |
| 390 bool m_drawTransformIsAnimating; | 392 bool m_drawTransformIsAnimating; |
| 391 bool m_screenSpaceTransformIsAnimating; | 393 bool m_screenSpaceTransformIsAnimating; |
| 392 | 394 |
| 393 #ifndef NDEBUG | 395 #ifndef NDEBUG |
| 394 bool m_betweenWillDrawAndDidDraw; | 396 bool m_betweenWillDrawAndDidDraw; |
| 395 #endif | 397 #endif |
| 396 | 398 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 414 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController; | 416 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController; |
| 415 | 417 |
| 416 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 418 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 417 }; | 419 }; |
| 418 | 420 |
| 419 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*>
::iterator end, LayerSorter*); | 421 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*>
::iterator end, LayerSorter*); |
| 420 | 422 |
| 421 } | 423 } |
| 422 | 424 |
| 423 #endif // CC_LAYER_IMPL_H_ | 425 #endif // CC_LAYER_IMPL_H_ |
| OLD | NEW |