| 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 65a6f4a5503b6fa0e8b0b7d12769b7250501c9b2..78c1b1c3f951e82ed4f169556ed3d9039f838c3f 100644
|
| --- a/content/renderer/gpu/compositor_output_surface.cc
|
| +++ b/content/renderer/gpu/compositor_output_surface.cc
|
| @@ -36,12 +36,11 @@ CompositorOutputSurface::CompositorOutputSurface(
|
| int32 routing_id,
|
| WebGraphicsContext3D* context3D,
|
| cc::SoftwareOutputDevice* software_device)
|
| - : output_surface_filter_(
|
| + : OutputSurfaceImpl(make_scoped_ptr(context3D),
|
| + make_scoped_ptr(software_device)),
|
| + output_surface_filter_(
|
| RenderThreadImpl::current()->compositor_output_surface_filter()),
|
| - client_(NULL),
|
| - routing_id_(routing_id),
|
| - context3D_(context3D),
|
| - software_device_(software_device) {
|
| + routing_id_(routing_id) {
|
| DCHECK(output_surface_filter_);
|
| capabilities_.has_parent_compositor = false;
|
| DetachFromThread();
|
| @@ -64,13 +63,9 @@ const struct cc::OutputSurface::Capabilities&
|
| bool CompositorOutputSurface::BindToClient(
|
| cc::OutputSurfaceClient* client) {
|
| DCHECK(CalledOnValidThread());
|
| - DCHECK(!client_);
|
| - if (context3D_.get()) {
|
| - if (!context3D_->makeContextCurrent())
|
| - return false;
|
| - }
|
|
|
| - client_ = client;
|
| + if (!cc::OutputSurfaceImpl::BindToClient(client))
|
| + return false;
|
|
|
| output_surface_proxy_ = new CompositorOutputSurfaceProxy(this);
|
| output_surface_filter_->AddRoute(
|
| @@ -83,10 +78,11 @@ bool CompositorOutputSurface::BindToClient(
|
|
|
| WebGraphicsContext3D* CompositorOutputSurface::Context3D() const {
|
| DCHECK(CalledOnValidThread());
|
| - return context3D_.get();
|
| + return context3d_.get();
|
| }
|
|
|
| cc::SoftwareOutputDevice* CompositorOutputSurface::SoftwareDevice() const {
|
| + DCHECK(CalledOnValidThread());
|
| return software_device_.get();
|
| }
|
|
|
|
|