Index: content/renderer/gpu/compositor_output_surface.cc |
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc |
index 1f1257ebd612ddc75dc02560bf43563d461d3f62..1b77278aa6cc376f843ab5cc11ca52fb6eca7e8f 100644 |
--- a/content/renderer/gpu/compositor_output_surface.cc |
+++ b/content/renderer/gpu/compositor_output_surface.cc |
@@ -13,6 +13,7 @@ |
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" |
using WebKit::WebGraphicsContext3D; |
+using WebKit::WebCompositorOutputSurfaceSoftware; |
//------------------------------------------------------------------------------ |
@@ -28,12 +29,14 @@ IPC::ForwardingMessageFilter* CompositorOutputSurface::CreateFilter( |
CompositorOutputSurface::CompositorOutputSurface( |
int32 routing_id, |
- WebGraphicsContext3D* context3D) |
+ WebGraphicsContext3D* context3D, |
+ WebCompositorOutputSurfaceSoftware* surfaceSoftware) |
piman
2012/08/28 23:26:59
nit: surface_software
|
: output_surface_filter_( |
RenderThreadImpl::current()->compositor_output_surface_filter()) |
, client_(NULL) |
piman
2012/08/28 23:26:59
nit: initializer style here too - I blame whoever
|
, routing_id_(routing_id) |
- , context3D_(context3D) { |
+ , context3D_(context3D) |
+ , surfaceSoftware_(surfaceSoftware) { |
DCHECK(output_surface_filter_); |
capabilities_.hasParentCompositor = false; |
DetachFromThread(); |
@@ -56,8 +59,10 @@ bool CompositorOutputSurface::bindToClient( |
WebKit::WebCompositorOutputSurfaceClient* client) { |
DCHECK(CalledOnValidThread()); |
DCHECK(!client_); |
- if (!context3D_->makeContextCurrent()) |
- return false; |
+ if (context3D_.get()) { |
+ if (!context3D_->makeContextCurrent()) |
+ return false; |
+ } |
client_ = client; |
@@ -74,6 +79,11 @@ WebGraphicsContext3D* CompositorOutputSurface::context3D() const { |
return context3D_.get(); |
} |
+WebCompositorOutputSurfaceSoftware* CompositorOutputSurface::surfaceSoftware() |
+ const { |
+ return surfaceSoftware_.get(); |
+} |
+ |
void CompositorOutputSurface::sendFrameToParentCompositor( |
const WebKit::WebCompositorFrame&) { |
DCHECK(CalledOnValidThread()); |