Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: cc/layer.h

Issue 11418217: Add skia::RefPtr class to wrap ref counted classes from Skia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/gl_renderer.cc ('k') | cc/layer.cc » ('j') | cc/skia_refptr.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CC_LAYER_H_ 5 #ifndef CC_LAYER_H_
6 #define CC_LAYER_H_ 6 #define CC_LAYER_H_
7 7
8 #include <public/WebFilterOperations.h> 8 #include <public/WebFilterOperations.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "cc/cc_export.h" 13 #include "cc/cc_export.h"
14 #include "cc/layer_animation_controller.h" 14 #include "cc/layer_animation_controller.h"
15 #include "cc/occlusion_tracker.h" 15 #include "cc/occlusion_tracker.h"
16 #include "cc/region.h" 16 #include "cc/region.h"
17 #include "cc/render_surface.h" 17 #include "cc/render_surface.h"
18 #include "cc/skia_refptr.h"
18 #include "third_party/skia/include/core/SkColor.h" 19 #include "third_party/skia/include/core/SkColor.h"
20 #include "third_party/skia/include/core/SkImageFilter.h"
19 #include "ui/gfx/rect.h" 21 #include "ui/gfx/rect.h"
20 #include "ui/gfx/rect_f.h" 22 #include "ui/gfx/rect_f.h"
21 #include "ui/gfx/transform.h" 23 #include "ui/gfx/transform.h"
22 24
23 namespace WebKit { 25 namespace WebKit {
24 class WebAnimationDelegate; 26 class WebAnimationDelegate;
25 class WebLayerScrollClient; 27 class WebLayerScrollClient;
26 } 28 }
27 29
28 class SkImageFilter;
29
30 namespace cc { 30 namespace cc {
31 31
32 class ActiveAnimation; 32 class ActiveAnimation;
33 struct AnimationEvent; 33 struct AnimationEvent;
34 class LayerAnimationDelegate; 34 class LayerAnimationDelegate;
35 class LayerImpl; 35 class LayerImpl;
36 class LayerTreeHost; 36 class LayerTreeHost;
37 class PriorityCalculator; 37 class PriorityCalculator;
38 class ResourceUpdateQueue; 38 class ResourceUpdateQueue;
39 class ScrollbarLayer; 39 class ScrollbarLayer;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 virtual void setNeedsDisplayRect(const gfx::RectF& dirtyRect); 95 virtual void setNeedsDisplayRect(const gfx::RectF& dirtyRect);
96 void setNeedsDisplay() { setNeedsDisplayRect(gfx::RectF(gfx::PointF(), bound s())); } 96 void setNeedsDisplay() { setNeedsDisplayRect(gfx::RectF(gfx::PointF(), bound s())); }
97 virtual bool needsDisplay() const; 97 virtual bool needsDisplay() const;
98 98
99 void setOpacity(float); 99 void setOpacity(float);
100 bool opacityIsAnimating() const; 100 bool opacityIsAnimating() const;
101 101
102 void setFilters(const WebKit::WebFilterOperations&); 102 void setFilters(const WebKit::WebFilterOperations&);
103 const WebKit::WebFilterOperations& filters() const { return m_filters; } 103 const WebKit::WebFilterOperations& filters() const { return m_filters; }
104 104
105 void setFilter(SkImageFilter* filter); 105 void setFilter(const SkiaRefPtr<SkImageFilter>& filter);
106 SkImageFilter* filter() const { return m_filter; } 106 SkiaRefPtr<SkImageFilter> filter() const { return m_filter; }
107 107
108 // Background filters are filters applied to what is behind this layer, when they are viewed through non-opaque 108 // Background filters are filters applied to what is behind this layer, when they are viewed through non-opaque
109 // regions in this layer. They are used through the WebLayer interface, and are not exposed to HTML. 109 // regions in this layer. They are used through the WebLayer interface, and are not exposed to HTML.
110 void setBackgroundFilters(const WebKit::WebFilterOperations&); 110 void setBackgroundFilters(const WebKit::WebFilterOperations&);
111 const WebKit::WebFilterOperations& backgroundFilters() const { return m_back groundFilters; } 111 const WebKit::WebFilterOperations& backgroundFilters() const { return m_back groundFilters; }
112 112
113 virtual void setContentsOpaque(bool); 113 virtual void setContentsOpaque(bool);
114 bool contentsOpaque() const { return m_contentsOpaque; } 114 bool contentsOpaque() const { return m_contentsOpaque; }
115 115
116 void setPosition(const gfx::PointF&); 116 void setPosition(const gfx::PointF&);
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 bool m_haveWheelEventHandlers; 364 bool m_haveWheelEventHandlers;
365 Region m_nonFastScrollableRegion; 365 Region m_nonFastScrollableRegion;
366 bool m_nonFastScrollableRegionChanged; 366 bool m_nonFastScrollableRegionChanged;
367 Region m_touchEventHandlerRegion; 367 Region m_touchEventHandlerRegion;
368 bool m_touchEventHandlerRegionChanged; 368 bool m_touchEventHandlerRegionChanged;
369 gfx::PointF m_position; 369 gfx::PointF m_position;
370 gfx::PointF m_anchorPoint; 370 gfx::PointF m_anchorPoint;
371 SkColor m_backgroundColor; 371 SkColor m_backgroundColor;
372 std::string m_debugName; 372 std::string m_debugName;
373 float m_opacity; 373 float m_opacity;
374 SkImageFilter* m_filter; 374 SkiaRefPtr<SkImageFilter> m_filter;
375 WebKit::WebFilterOperations m_filters; 375 WebKit::WebFilterOperations m_filters;
376 WebKit::WebFilterOperations m_backgroundFilters; 376 WebKit::WebFilterOperations m_backgroundFilters;
377 float m_anchorPointZ; 377 float m_anchorPointZ;
378 bool m_isContainerForFixedPositionLayers; 378 bool m_isContainerForFixedPositionLayers;
379 bool m_fixedToContainerLayer; 379 bool m_fixedToContainerLayer;
380 bool m_isDrawable; 380 bool m_isDrawable;
381 bool m_masksToBounds; 381 bool m_masksToBounds;
382 bool m_contentsOpaque; 382 bool m_contentsOpaque;
383 bool m_doubleSided; 383 bool m_doubleSided;
384 bool m_useLCDText; 384 bool m_useLCDText;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; 421 WebKit::WebAnimationDelegate* m_layerAnimationDelegate;
422 WebKit::WebLayerScrollClient* m_layerScrollClient; 422 WebKit::WebLayerScrollClient* m_layerScrollClient;
423 }; 423 };
424 424
425 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*); 425 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*);
426 426
427 } // namespace cc 427 } // namespace cc
428 428
429 #endif // CC_LAYER_H_ 429 #endif // CC_LAYER_H_
OLDNEW
« no previous file with comments | « cc/gl_renderer.cc ('k') | cc/layer.cc » ('j') | cc/skia_refptr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698