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 "cc/skia_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 75 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 SkiaRefPtr<SkImageFilter>&); |
119 SkImageFilter* filter() const { return m_filter; } | 121 SkiaRefPtr<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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 // to sort layers from back to front. | 387 // to sort layers from back to front. |
386 float m_drawDepth; | 388 float m_drawDepth; |
387 float m_drawOpacity; | 389 float m_drawOpacity; |
388 bool m_drawOpacityIsAnimating; | 390 bool m_drawOpacityIsAnimating; |
389 | 391 |
390 // Debug layer name. | 392 // Debug layer name. |
391 std::string m_debugName; | 393 std::string m_debugName; |
392 | 394 |
393 WebKit::WebFilterOperations m_filters; | 395 WebKit::WebFilterOperations m_filters; |
394 WebKit::WebFilterOperations m_backgroundFilters; | 396 WebKit::WebFilterOperations m_backgroundFilters; |
395 SkImageFilter* m_filter; | 397 SkiaRefPtr<SkImageFilter> m_filter; |
396 | 398 |
397 gfx::Transform m_drawTransform; | 399 gfx::Transform m_drawTransform; |
398 gfx::Transform m_screenSpaceTransform; | 400 gfx::Transform m_screenSpaceTransform; |
399 bool m_drawTransformIsAnimating; | 401 bool m_drawTransformIsAnimating; |
400 bool m_screenSpaceTransformIsAnimating; | 402 bool m_screenSpaceTransformIsAnimating; |
401 | 403 |
402 #ifndef NDEBUG | 404 #ifndef NDEBUG |
403 bool m_betweenWillDrawAndDidDraw; | 405 bool m_betweenWillDrawAndDidDraw; |
404 #endif | 406 #endif |
405 | 407 |
(...skipping 20 matching lines...) Expand all Loading... |
426 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController; | 428 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController; |
427 | 429 |
428 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 430 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
429 }; | 431 }; |
430 | 432 |
431 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*>
::iterator end, LayerSorter*); | 433 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*>
::iterator end, LayerSorter*); |
432 | 434 |
433 } | 435 } |
434 | 436 |
435 #endif // CC_LAYER_IMPL_H_ | 437 #endif // CC_LAYER_IMPL_H_ |
OLD | NEW |