Chromium Code Reviews| 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 "CCOcclusionTracker.h" | 9 #include "CCOcclusionTracker.h" |
| 10 #include "FloatPoint.h" | 10 #include "FloatPoint.h" |
| 11 #include "Region.h" | 11 #include "Region.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.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 CCActiveAnimation; | 29 class CCActiveAnimation; |
| 28 struct CCAnimationEvent; | 30 struct CCAnimationEvent; |
| 29 class CCLayerAnimationDelegate; | 31 class CCLayerAnimationDelegate; |
| 30 class CCLayerImpl; | 32 class CCLayerImpl; |
| 31 class CCLayerTreeHost; | 33 class CCLayerTreeHost; |
| 32 class CCPriorityCalculator; | 34 class CCPriorityCalculator; |
| 33 class CCTextureUpdateQueue; | 35 class CCTextureUpdateQueue; |
| 34 class ScrollbarLayerChromium; | 36 class ScrollbarLayerChromium; |
| (...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); | |
|
danakj
2012/10/19 19:34:24
same, setImageFilter?
Stephen White
2012/10/19 21:34:50
Same as above.
| |
| 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; | |
|
jamesr
2012/10/19 19:15:30
Should this be a SkTAutoUnref<> or something of th
Stephen White
2012/10/19 21:34:50
You're totally right. Wow, what a doozy.
I've ad
| |
| 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<LayerChromium> >::iterator, std::vecto r<scoped_refptr<LayerChromium> >::iterator, void*); | 388 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto r<scoped_refptr<LayerChromium> >::iterator, void*); |
| 383 | 389 |
| 384 } // namespace cc | 390 } // namespace cc |
| 385 | 391 |
| 386 #endif | 392 #endif |
| OLD | NEW |