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

Side by Side Diff: cc/layer.h

Issue 11412255: cc: Use skia::RefPtr in place of raw pointers and SkAutoTUnref. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ref() 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/heads_up_display_layer_impl.cc ('k') | cc/layer.cc » ('j') | no next file with comments »
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 "skia/ext/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 skia::RefPtr<SkImageFilter>& filter);
106 SkImageFilter* filter() const { return m_filter; } 106 skia::RefPtr<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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 bool m_haveWheelEventHandlers; 366 bool m_haveWheelEventHandlers;
367 Region m_nonFastScrollableRegion; 367 Region m_nonFastScrollableRegion;
368 bool m_nonFastScrollableRegionChanged; 368 bool m_nonFastScrollableRegionChanged;
369 Region m_touchEventHandlerRegion; 369 Region m_touchEventHandlerRegion;
370 bool m_touchEventHandlerRegionChanged; 370 bool m_touchEventHandlerRegionChanged;
371 gfx::PointF m_position; 371 gfx::PointF m_position;
372 gfx::PointF m_anchorPoint; 372 gfx::PointF m_anchorPoint;
373 SkColor m_backgroundColor; 373 SkColor m_backgroundColor;
374 std::string m_debugName; 374 std::string m_debugName;
375 float m_opacity; 375 float m_opacity;
376 SkImageFilter* m_filter; 376 skia::RefPtr<SkImageFilter> m_filter;
377 WebKit::WebFilterOperations m_filters; 377 WebKit::WebFilterOperations m_filters;
378 WebKit::WebFilterOperations m_backgroundFilters; 378 WebKit::WebFilterOperations m_backgroundFilters;
379 float m_anchorPointZ; 379 float m_anchorPointZ;
380 bool m_isContainerForFixedPositionLayers; 380 bool m_isContainerForFixedPositionLayers;
381 bool m_fixedToContainerLayer; 381 bool m_fixedToContainerLayer;
382 bool m_isDrawable; 382 bool m_isDrawable;
383 bool m_masksToBounds; 383 bool m_masksToBounds;
384 bool m_contentsOpaque; 384 bool m_contentsOpaque;
385 bool m_doubleSided; 385 bool m_doubleSided;
386 bool m_useLCDText; 386 bool m_useLCDText;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 422
423 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; 423 WebKit::WebAnimationDelegate* m_layerAnimationDelegate;
424 WebKit::WebLayerScrollClient* m_layerScrollClient; 424 WebKit::WebLayerScrollClient* m_layerScrollClient;
425 }; 425 };
426 426
427 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*); 427 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*);
428 428
429 } // namespace cc 429 } // namespace cc
430 430
431 #endif // CC_LAYER_H_ 431 #endif // CC_LAYER_H_
OLDNEW
« no previous file with comments | « cc/heads_up_display_layer_impl.cc ('k') | cc/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698