Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1728)

Unified Diff: content/renderer/gpu/compositor_output_surface.cc

Issue 11967033: [CLOSED] In-browser software compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the lack SkCanvas::clear scissoring. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | content/renderer/gpu/compositor_software_output_device_gl_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698