Index: Source/core/platform/graphics/GraphicsContext.cpp |
diff --git a/Source/core/platform/graphics/GraphicsContext.cpp b/Source/core/platform/graphics/GraphicsContext.cpp |
index ff5f9f0a831ba1f242e548d5408e83cf311e799f..f2b7491a60681c9d6f0bc5b92203475e06876f0a 100644 |
--- a/Source/core/platform/graphics/GraphicsContext.cpp |
+++ b/Source/core/platform/graphics/GraphicsContext.cpp |
@@ -55,22 +55,22 @@ using namespace std; |
namespace WebCore { |
-GraphicsContext::GraphicsContext(PlatformGraphicsContext* platformGraphicsContext) |
+GraphicsContext::GraphicsContext(SkCanvas* canvas) |
: m_updatingControlTints(false) |
, m_transparencyCount(0) |
{ |
- if (platformGraphicsContext) |
- platformGraphicsContext->setGraphicsContext(this); |
+ m_data = new PlatformContextSkia(canvas); |
+ m_data->setGraphicsContext(this); |
// the caller owns the gc |
- m_data = platformGraphicsContext; |
- setPaintingDisabled(!platformGraphicsContext || !platformGraphicsContext->canvas()); |
+ setPaintingDisabled(!canvas); |
} |
GraphicsContext::~GraphicsContext() |
{ |
ASSERT(m_stack.isEmpty()); |
ASSERT(!m_transparencyCount); |
+ delete m_data; |
jamesr
2013/04/29 23:56:17
can you instead make m_data an OwnPtr<> since you'
|
} |
PlatformGraphicsContext* GraphicsContext::platformContext() const |