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

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

Issue 10873099: Flag and adapter class for software compositing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 3 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 1f1257ebd612ddc75dc02560bf43563d461d3f62..f0704ffb7c6cf2457fec02bd4771a01fa66f6a18 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::WebCompositorSoftwareOutputDevice;
//------------------------------------------------------------------------------
@@ -28,12 +29,14 @@ IPC::ForwardingMessageFilter* CompositorOutputSurface::CreateFilter(
CompositorOutputSurface::CompositorOutputSurface(
int32 routing_id,
- WebGraphicsContext3D* context3D)
+ WebGraphicsContext3D* context3D,
+ WebCompositorSoftwareOutputDevice* software_device)
: output_surface_filter_(
- RenderThreadImpl::current()->compositor_output_surface_filter())
- , client_(NULL)
- , routing_id_(routing_id)
- , context3D_(context3D) {
+ RenderThreadImpl::current()->compositor_output_surface_filter()),
+ client_(NULL),
+ routing_id_(routing_id),
+ context3D_(context3D),
+ software_device_(software_device) {
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();
}
+WebCompositorSoftwareOutputDevice* CompositorOutputSurface::softwareDevice()
+ const {
+ return software_device_.get();
+}
+
void CompositorOutputSurface::sendFrameToParentCompositor(
const WebKit::WebCompositorFrame&) {
DCHECK(CalledOnValidThread());
« 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