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 <public/WebFilterOperations.h> | 8 #include <public/WebFilterOperations.h> |
9 #include <string> | 9 #include <string> |
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 "cc/cc_export.h" | 13 #include "cc/cc_export.h" |
14 #include "cc/input_handler.h" | 14 #include "cc/input_handler.h" |
15 #include "cc/layer_animation_controller.h" | 15 #include "cc/layer_animation_controller.h" |
16 #include "cc/region.h" | 16 #include "cc/region.h" |
17 #include "cc/render_pass.h" | 17 #include "cc/render_pass.h" |
18 #include "cc/render_surface_impl.h" | 18 #include "cc/render_surface_impl.h" |
19 #include "cc/resource_provider.h" | 19 #include "cc/resource_provider.h" |
20 #include "cc/scoped_ptr_vector.h" | 20 #include "cc/scoped_ptr_vector.h" |
21 #include "cc/shared_quad_state.h" | 21 #include "cc/shared_quad_state.h" |
| 22 #include "skia/ext/refptr.h" |
22 #include "third_party/skia/include/core/SkColor.h" | 23 #include "third_party/skia/include/core/SkColor.h" |
| 24 #include "third_party/skia/include/core/SkImageFilter.h" |
23 #include "ui/gfx/rect.h" | 25 #include "ui/gfx/rect.h" |
24 #include "ui/gfx/rect_f.h" | 26 #include "ui/gfx/rect_f.h" |
25 #include "ui/gfx/transform.h" | 27 #include "ui/gfx/transform.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; |
32 class Renderer; | 34 class Renderer; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 114 |
113 void setBackgroundColor(SkColor); | 115 void setBackgroundColor(SkColor); |
114 SkColor backgroundColor() const { return m_backgroundColor; } | 116 SkColor backgroundColor() const { return m_backgroundColor; } |
115 | 117 |
116 void setFilters(const WebKit::WebFilterOperations&); | 118 void setFilters(const WebKit::WebFilterOperations&); |
117 const WebKit::WebFilterOperations& filters() const { return m_filters; } | 119 const WebKit::WebFilterOperations& filters() const { return m_filters; } |
118 | 120 |
119 void setBackgroundFilters(const WebKit::WebFilterOperations&); | 121 void setBackgroundFilters(const WebKit::WebFilterOperations&); |
120 const WebKit::WebFilterOperations& backgroundFilters() const { return m_back
groundFilters; } | 122 const WebKit::WebFilterOperations& backgroundFilters() const { return m_back
groundFilters; } |
121 | 123 |
122 void setFilter(SkImageFilter*); | 124 void setFilter(const skia::RefPtr<SkImageFilter>&); |
123 SkImageFilter* filter() const { return m_filter; } | 125 skia::RefPtr<SkImageFilter> filter() const { return m_filter; } |
124 | 126 |
125 void setMasksToBounds(bool); | 127 void setMasksToBounds(bool); |
126 bool masksToBounds() const { return m_masksToBounds; } | 128 bool masksToBounds() const { return m_masksToBounds; } |
127 | 129 |
128 void setContentsOpaque(bool); | 130 void setContentsOpaque(bool); |
129 bool contentsOpaque() const { return m_contentsOpaque; } | 131 bool contentsOpaque() const { return m_contentsOpaque; } |
130 | 132 |
131 void setOpacity(float); | 133 void setOpacity(float); |
132 bool opacityIsAnimating() const; | 134 bool opacityIsAnimating() const; |
133 | 135 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 // to sort layers from back to front. | 391 // to sort layers from back to front. |
390 float m_drawDepth; | 392 float m_drawDepth; |
391 float m_drawOpacity; | 393 float m_drawOpacity; |
392 bool m_drawOpacityIsAnimating; | 394 bool m_drawOpacityIsAnimating; |
393 | 395 |
394 // Debug layer name. | 396 // Debug layer name. |
395 std::string m_debugName; | 397 std::string m_debugName; |
396 | 398 |
397 WebKit::WebFilterOperations m_filters; | 399 WebKit::WebFilterOperations m_filters; |
398 WebKit::WebFilterOperations m_backgroundFilters; | 400 WebKit::WebFilterOperations m_backgroundFilters; |
399 SkImageFilter* m_filter; | 401 skia::RefPtr<SkImageFilter> m_filter; |
400 | 402 |
401 gfx::Transform m_drawTransform; | 403 gfx::Transform m_drawTransform; |
402 gfx::Transform m_screenSpaceTransform; | 404 gfx::Transform m_screenSpaceTransform; |
403 bool m_drawTransformIsAnimating; | 405 bool m_drawTransformIsAnimating; |
404 bool m_screenSpaceTransformIsAnimating; | 406 bool m_screenSpaceTransformIsAnimating; |
405 | 407 |
406 #ifndef NDEBUG | 408 #ifndef NDEBUG |
407 bool m_betweenWillDrawAndDidDraw; | 409 bool m_betweenWillDrawAndDidDraw; |
408 #endif | 410 #endif |
409 | 411 |
(...skipping 20 matching lines...) Expand all Loading... |
430 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController; | 432 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController; |
431 | 433 |
432 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 434 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
433 }; | 435 }; |
434 | 436 |
435 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*>
::iterator end, LayerSorter*); | 437 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*>
::iterator end, LayerSorter*); |
436 | 438 |
437 } | 439 } |
438 | 440 |
439 #endif // CC_LAYER_IMPL_H_ | 441 #endif // CC_LAYER_IMPL_H_ |
OLD | NEW |