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

Unified Diff: Source/core/platform/graphics/GraphicsContextState.h

Issue 17448009: Use skia::RefPtr to avoid having to manually refcount GraphicsContextState::m_looper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/GraphicsContextState.h
diff --git a/Source/core/platform/graphics/GraphicsContextState.h b/Source/core/platform/graphics/GraphicsContextState.h
index 59396b8d996ba1e6ca2caa02372a1dcb96118552..73d2b9c0454f79447a2f4ab8335e8a77dd315cda 100644
--- a/Source/core/platform/graphics/GraphicsContextState.h
+++ b/Source/core/platform/graphics/GraphicsContextState.h
@@ -37,6 +37,7 @@
#include "third_party/skia/include/core/SkColorPriv.h"
#include "third_party/skia/include/core/SkDrawLooper.h"
+#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/effects/SkDashPathEffect.h"
#include "wtf/PassOwnPtr.h"
@@ -47,10 +48,7 @@ namespace WebCore {
// Only GraphicsContext can use this class.
class GraphicsContextState {
public:
- ~GraphicsContextState()
- {
- SkSafeUnref(m_looper);
- }
+ ~GraphicsContextState() { }
private:
friend class GraphicsContext;
@@ -58,7 +56,6 @@ private:
GraphicsContextState()
: m_fillColor(Color::black)
, m_fillRule(RULE_NONZERO)
- , m_looper(0)
, m_textDrawingMode(TextModeFill)
, m_alpha(1)
, m_xferMode(SkXfermode::kSrcOver_Mode)
@@ -95,9 +92,6 @@ private:
, m_shouldSmoothFonts(other.m_shouldSmoothFonts)
, m_shadowsIgnoreTransforms(other.m_shadowsIgnoreTransforms)
{
- // Up the ref count of these. SkSafeRef does nothing if its argument is 0.
- SkSafeRef(m_looper);
-
// The clip image only needs to be applied once. Reset the image so that we
// don't attempt to clip multiple times.
m_imageBufferClip.reset();
@@ -133,7 +127,7 @@ private:
RefPtr<Pattern> m_fillPattern;
// Shadow. (This will need tweaking if we use draw loopers for other things.)
- SkDrawLooper* m_looper;
+ SkRefPtr<SkDrawLooper> m_looper;
danakj 2013/06/19 15:47:13 I believe you want to use SKAutoTUnref instead. Sk
// Text. (See TextModeFill & friends.)
TextDrawingModeFlags m_textDrawingMode;
« no previous file with comments | « Source/core/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698