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

Unified Diff: cc/test/FakeWebCompositorOutputSurface.h

Issue 10918258: Add CC software renderer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@gladapter
Patch Set: Fix license headers 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
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/FakeWebCompositorSoftwareOutputDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/FakeWebCompositorOutputSurface.h
diff --git a/cc/test/FakeWebCompositorOutputSurface.h b/cc/test/FakeWebCompositorOutputSurface.h
index 97ebbac24f4cbb40ee265624d5855d52d32f8b42..01b6638cd5d8816063e87e66ef4b131d9782011f 100644
--- a/cc/test/FakeWebCompositorOutputSurface.h
+++ b/cc/test/FakeWebCompositorOutputSurface.h
@@ -5,6 +5,7 @@
#ifndef FakeWebCompositorOutputSurface_h
#define FakeWebCompositorOutputSurface_h
+#include "FakeWebCompositorSoftwareOutputDevice.h"
#include <public/WebCompositorOutputSurface.h>
#include <public/WebGraphicsContext3D.h>
#include <wtf/OwnPtr.h>
@@ -19,9 +20,15 @@ public:
return adoptPtr(new FakeWebCompositorOutputSurface(context3D));
}
+ static inline PassOwnPtr<FakeWebCompositorOutputSurface> createSoftware(PassOwnPtr<WebCompositorSoftwareOutputDevice> softwareDevice)
+ {
+ return adoptPtr(new FakeWebCompositorOutputSurface(softwareDevice));
+ }
virtual bool bindToClient(WebCompositorOutputSurfaceClient* client) OVERRIDE
{
+ if (!m_context3D)
+ return true;
ASSERT(client);
if (!m_context3D->makeContextCurrent())
return false;
@@ -38,6 +45,10 @@ public:
{
return m_context3D.get();
}
+ virtual WebCompositorSoftwareOutputDevice* softwareDevice() const OVERRIDE
+ {
+ return m_softwareDevice.get();
+ }
virtual void sendFrameToParentCompositor(const WebCompositorFrame&) OVERRIDE
{
@@ -49,7 +60,13 @@ private:
m_context3D = context3D;
}
+ explicit FakeWebCompositorOutputSurface(PassOwnPtr<WebCompositorSoftwareOutputDevice> softwareDevice)
+ {
+ m_softwareDevice = softwareDevice;
+ }
+
OwnPtr<WebGraphicsContext3D> m_context3D;
+ OwnPtr<WebCompositorSoftwareOutputDevice> m_softwareDevice;
Capabilities m_capabilities;
WebCompositorOutputSurfaceClient* m_client;
};
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/FakeWebCompositorSoftwareOutputDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698