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

Unified Diff: Source/core/platform/graphics/GraphicsContext.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: switch to skia::RefPtr, remove superfluous copy of m_imageBufferClip 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 | « no previous file | Source/core/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/GraphicsContext.h
diff --git a/Source/core/platform/graphics/GraphicsContext.h b/Source/core/platform/graphics/GraphicsContext.h
index 8ae8bf801359bc264f24846a4a704ff07d918b58..db6c5cbe5931ffd51f9a4847d9f5ff88f410faba 100644
--- a/Source/core/platform/graphics/GraphicsContext.h
+++ b/Source/core/platform/graphics/GraphicsContext.h
@@ -38,7 +38,7 @@
#include "core/platform/graphics/ImageBuffer.h"
#include "core/platform/graphics/ImageOrientation.h"
#include "core/platform/graphics/skia/OpaqueRegionSkia.h"
-
+#include "skia/ext/refptr.h"
jamesr 2013/06/19 17:45:26 this creates a cycle between the chromium and blin
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkDevice.h"
#include "third_party/skia/include/core/SkPaint.h"
@@ -46,9 +46,8 @@
#include "third_party/skia/include/core/SkRect.h"
#include "third_party/skia/include/core/SkRRect.h"
#include "third_party/skia/include/effects/SkCornerPathEffect.h"
-
-#include <wtf/Noncopyable.h>
-#include <wtf/PassOwnPtr.h>
+#include "wtf/Noncopyable.h"
+#include "wtf/PassOwnPtr.h"
namespace WebCore {
@@ -136,7 +135,7 @@ public:
void setFillGradient(PassRefPtr<Gradient>);
Gradient* fillGradient() const { return m_state->m_fillGradient.get(); }
- SkDrawLooper* drawLooper() const { return m_state->m_looper; }
+ SkDrawLooper* drawLooper() const { return m_state->m_looper.get(); }
SkColor effectiveStrokeColor() const { return m_state->applyAlpha(m_state->m_strokeData.color().rgb()); }
int getNormalizedAlpha() const;
@@ -394,7 +393,7 @@ private:
return value;
}
- void setDrawLooper(SkDrawLooper* looper) { SkRefCnt_SafeAssign(m_state->m_looper, looper); }
+ void setDrawLooper(SkDrawLooper* looper) { m_state->m_looper = skia::SharePtr(looper); }
// Sets up the common flags on a paint for antialiasing, effects, etc.
// This is implicitly called by setupPaintFill and setupPaintStroke, but
« no previous file with comments | « no previous file | Source/core/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698