Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / graphics / gpu / WebGLImageBufferSurface.cpp
index 8cf16ff..3b1cfa1 100644 (file)
 
 #include "platform/graphics/gpu/WebGLImageBufferSurface.h"
 
-#include "platform/graphics/gpu/SharedGraphicsContext3D.h"
 #include "platform/graphics/skia/GaneshUtils.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebGraphicsContext3DProvider.h"
 #include "third_party/skia/include/core/SkPixelRef.h"
+#include "wtf/PassOwnPtr.h"
 
 namespace WebCore {
 
 WebGLImageBufferSurface::WebGLImageBufferSurface(const IntSize& size, OpacityMode opacityMode)
     : ImageBufferSurface(size, opacityMode)
 {
-    GrContext* gr = SharedGraphicsContext3D::get()->grContext();
+    m_contextProvider = adoptPtr(blink::Platform::current()->createSharedOffscreenGraphicsContext3DProvider());
+    if (!m_contextProvider)
+        return;
+    GrContext* gr = m_contextProvider->grContext();
     if (!gr)
         return;
     ensureTextureBackedSkBitmap(gr, m_bitmap, size, kDefault_GrSurfaceOrigin, kRGBA_8888_GrPixelConfig);