OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 LayerChromium_h | 5 #ifndef LayerChromium_h |
6 #define LayerChromium_h | 6 #define LayerChromium_h |
7 | 7 |
8 #include "CCLayerAnimationController.h" | 8 #include "CCLayerAnimationController.h" |
9 #include "FloatPoint.h" | 9 #include "FloatPoint.h" |
10 #include "Region.h" | 10 #include "Region.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "cc/occlusion_tracker.h" | 12 #include "cc/occlusion_tracker.h" |
13 #include "cc/render_surface.h" | 13 #include "cc/render_surface.h" |
14 #include "third_party/skia/include/core/SkColor.h" | 14 #include "third_party/skia/include/core/SkColor.h" |
15 #include <public/WebFilterOperations.h> | 15 #include <public/WebFilterOperations.h> |
16 #include <public/WebTransformationMatrix.h> | 16 #include <public/WebTransformationMatrix.h> |
17 #include <string> | 17 #include <string> |
18 #include <vector> | 18 #include <vector> |
19 | 19 |
20 namespace WebKit { | 20 namespace WebKit { |
21 class WebAnimationDelegate; | 21 class WebAnimationDelegate; |
22 class WebLayerScrollClient; | 22 class WebLayerScrollClient; |
23 } | 23 } |
24 | 24 |
| 25 class SkImageFilter; |
| 26 |
25 namespace cc { | 27 namespace cc { |
26 | 28 |
27 class ActiveAnimation; | 29 class ActiveAnimation; |
28 struct AnimationEvent; | 30 struct AnimationEvent; |
29 class LayerAnimationDelegate; | 31 class LayerAnimationDelegate; |
30 class LayerImpl; | 32 class LayerImpl; |
31 class LayerTreeHost; | 33 class LayerTreeHost; |
32 class PriorityCalculator; | 34 class PriorityCalculator; |
33 class TextureUpdateQueue; | 35 class TextureUpdateQueue; |
34 class ScrollbarLayer; | 36 class ScrollbarLayer; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 virtual void setNeedsDisplayRect(const FloatRect& dirtyRect); | 90 virtual void setNeedsDisplayRect(const FloatRect& dirtyRect); |
89 void setNeedsDisplay() { setNeedsDisplayRect(FloatRect(FloatPoint(), bounds(
))); } | 91 void setNeedsDisplay() { setNeedsDisplayRect(FloatRect(FloatPoint(), bounds(
))); } |
90 virtual bool needsDisplay() const; | 92 virtual bool needsDisplay() const; |
91 | 93 |
92 void setOpacity(float); | 94 void setOpacity(float); |
93 bool opacityIsAnimating() const; | 95 bool opacityIsAnimating() const; |
94 | 96 |
95 void setFilters(const WebKit::WebFilterOperations&); | 97 void setFilters(const WebKit::WebFilterOperations&); |
96 const WebKit::WebFilterOperations& filters() const { return m_filters; } | 98 const WebKit::WebFilterOperations& filters() const { return m_filters; } |
97 | 99 |
| 100 void setFilter(SkImageFilter* filter); |
| 101 SkImageFilter* filter() const { return m_filter; } |
| 102 |
98 // Background filters are filters applied to what is behind this layer, when
they are viewed through non-opaque | 103 // Background filters are filters applied to what is behind this layer, when
they are viewed through non-opaque |
99 // regions in this layer. They are used through the WebLayer interface, and
are not exposed to HTML. | 104 // regions in this layer. They are used through the WebLayer interface, and
are not exposed to HTML. |
100 void setBackgroundFilters(const WebKit::WebFilterOperations&); | 105 void setBackgroundFilters(const WebKit::WebFilterOperations&); |
101 const WebKit::WebFilterOperations& backgroundFilters() const { return m_back
groundFilters; } | 106 const WebKit::WebFilterOperations& backgroundFilters() const { return m_back
groundFilters; } |
102 | 107 |
103 virtual void setContentsOpaque(bool); | 108 virtual void setContentsOpaque(bool); |
104 bool contentsOpaque() const { return m_contentsOpaque; } | 109 bool contentsOpaque() const { return m_contentsOpaque; } |
105 | 110 |
106 void setPosition(const FloatPoint&); | 111 void setPosition(const FloatPoint&); |
107 FloatPoint position() const { return m_position; } | 112 FloatPoint position() const { return m_position; } |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 bool m_haveWheelEventHandlers; | 333 bool m_haveWheelEventHandlers; |
329 Region m_nonFastScrollableRegion; | 334 Region m_nonFastScrollableRegion; |
330 bool m_nonFastScrollableRegionChanged; | 335 bool m_nonFastScrollableRegionChanged; |
331 FloatPoint m_position; | 336 FloatPoint m_position; |
332 FloatPoint m_anchorPoint; | 337 FloatPoint m_anchorPoint; |
333 SkColor m_backgroundColor; | 338 SkColor m_backgroundColor; |
334 SkColor m_debugBorderColor; | 339 SkColor m_debugBorderColor; |
335 float m_debugBorderWidth; | 340 float m_debugBorderWidth; |
336 std::string m_debugName; | 341 std::string m_debugName; |
337 float m_opacity; | 342 float m_opacity; |
| 343 SkImageFilter* m_filter; |
338 WebKit::WebFilterOperations m_filters; | 344 WebKit::WebFilterOperations m_filters; |
339 WebKit::WebFilterOperations m_backgroundFilters; | 345 WebKit::WebFilterOperations m_backgroundFilters; |
340 float m_anchorPointZ; | 346 float m_anchorPointZ; |
341 bool m_isContainerForFixedPositionLayers; | 347 bool m_isContainerForFixedPositionLayers; |
342 bool m_fixedToContainerLayer; | 348 bool m_fixedToContainerLayer; |
343 bool m_isDrawable; | 349 bool m_isDrawable; |
344 bool m_masksToBounds; | 350 bool m_masksToBounds; |
345 bool m_contentsOpaque; | 351 bool m_contentsOpaque; |
346 bool m_doubleSided; | 352 bool m_doubleSided; |
347 bool m_useLCDText; | 353 bool m_useLCDText; |
(...skipping 29 matching lines...) Expand all Loading... |
377 | 383 |
378 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 384 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
379 WebKit::WebLayerScrollClient* m_layerScrollClient; | 385 WebKit::WebLayerScrollClient* m_layerScrollClient; |
380 }; | 386 }; |
381 | 387 |
382 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 388 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
383 | 389 |
384 } // namespace cc | 390 } // namespace cc |
385 | 391 |
386 #endif | 392 #endif |
OLD | NEW |