Index: webkit/support/test_webkit_platform_support.cc |
diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc |
index 542208cc17bc6505861d0421f795fadb4423edbc..45dd92698374a6269d263a3fda192075298f6757 100644 |
--- a/webkit/support/test_webkit_platform_support.cc |
+++ b/webkit/support/test_webkit_platform_support.cc |
@@ -439,6 +439,22 @@ TestWebKitPlatformSupport::createOffscreenGraphicsContext3D( |
return NULL; |
} |
+WebKit::WebGraphicsContext3D* |
+TestWebKitPlatformSupport::sharedOffscreenGraphicsContext3D() { |
+ static WebKit::WebGraphicsContext3D* context = NULL; |
piman
2013/02/11 18:19:46
/Cry. Can't we make this a member?
danakj
2013/02/11 18:22:06
Uhm, yah I guess so!
danakj
2013/02/11 18:33:57
Done.
|
+ if (!context) { |
+ WebKit::WebGraphicsContext3D::Attributes attributes; |
+ attributes.depth = false; |
+ attributes.stencil = true; |
+ attributes.antialias = false; |
+ attributes.shareResources = true; |
+ attributes.noAutomaticFlushes = true; |
+ context = createOffscreenGraphicsContext3D(attributes); |
+ } |
+ return context; |
+} |
+ |
+ |
bool TestWebKitPlatformSupport::canAccelerate2dCanvas() { |
// We supply an OS-MESA based context for accelarated 2d |
// canvas, which should always work. |