Index: chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc |
=================================================================== |
--- chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc (revision 50735) |
+++ chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc (working copy) |
@@ -28,7 +28,15 @@ |
} |
} |
+// TODO(vangelis): Properly implement this method once the upstream WebKit |
+// changes have landed. |
bool WebGraphicsContext3DCommandBufferImpl::initialize( |
+ WebGraphicsContext3D::Attributes attributes, |
+ WebKit::WebView*) { |
+ return initialize(attributes); |
+} |
+ |
+bool WebGraphicsContext3DCommandBufferImpl::initialize( |
WebGraphicsContext3D::Attributes attributes) { |
RenderThread* render_thread = RenderThread::current(); |
if (!render_thread) |
@@ -81,6 +89,17 @@ |
return true; |
} |
+unsigned int WebGraphicsContext3DCommandBufferImpl::getPlatformTextureId() { |
+ DCHECK(context_); |
+ return ggl::GetParentTextureId(context_); |
+} |
+ |
+void WebGraphicsContext3DCommandBufferImpl::prepareTexture() { |
+ // Copies the contents of the off-screen render target into the texture |
+ // used by the compositor. |
+ ggl::SwapBuffers(context_); |
+} |
+ |
void WebGraphicsContext3DCommandBufferImpl::reshape(int width, int height) { |
cached_width_ = width; |
cached_height_ = height; |