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

Unified Diff: cc/test/fake_output_surface.h

Issue 12041062: Have a common implementation of cc::OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 10 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/test/DEPS ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_output_surface.h
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index 360e2530724bca061890e9cd685eed18d527d418..2ab79066ebab4a00c111ea52e143f954d407278a 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -5,8 +5,6 @@
#ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_
#define CC_TEST_FAKE_OUTPUT_SURFACE_H_
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "cc/compositor_frame.h"
#include "cc/output_surface.h"
#include "cc/test/fake_software_output_device.h"
@@ -19,12 +17,12 @@ class FakeOutputSurface : public OutputSurface {
public:
virtual ~FakeOutputSurface();
- static inline scoped_ptr<FakeOutputSurface> Create3d(
+ static scoped_ptr<FakeOutputSurface> Create3d(
scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
return make_scoped_ptr(new FakeOutputSurface(context3d.Pass(), false));
}
- static inline scoped_ptr<FakeOutputSurface> Create3d() {
+ static scoped_ptr<FakeOutputSurface> Create3d() {
scoped_ptr<WebKit::WebGraphicsContext3D> context3d =
TestWebGraphicsContext3D::Create(
WebKit::WebGraphicsContext3D::Attributes())
@@ -32,18 +30,18 @@ class FakeOutputSurface : public OutputSurface {
return make_scoped_ptr(new FakeOutputSurface(context3d.Pass(), false));
}
- static inline scoped_ptr<FakeOutputSurface> CreateSoftware(
+ static scoped_ptr<FakeOutputSurface> CreateSoftware(
scoped_ptr<SoftwareOutputDevice> software_device) {
return make_scoped_ptr(
new FakeOutputSurface(software_device.Pass(), false));
}
- static inline scoped_ptr<FakeOutputSurface> CreateDelegating3d(
+ static scoped_ptr<FakeOutputSurface> CreateDelegating3d(
scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
return make_scoped_ptr(new FakeOutputSurface(context3d.Pass(), true));
}
- static inline scoped_ptr<FakeOutputSurface> CreateDelegating3d() {
+ static scoped_ptr<FakeOutputSurface> CreateDelegating3d() {
scoped_ptr<WebKit::WebGraphicsContext3D> context3d =
TestWebGraphicsContext3D::Create(
WebKit::WebGraphicsContext3D::Attributes())
@@ -51,34 +49,27 @@ class FakeOutputSurface : public OutputSurface {
return make_scoped_ptr(new FakeOutputSurface(context3d.Pass(), true));
}
- static inline scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware(
+ static scoped_ptr<FakeOutputSurface> CreateDelegatingSoftware(
scoped_ptr<SoftwareOutputDevice> software_device) {
return make_scoped_ptr(
new FakeOutputSurface(software_device.Pass(), true));
}
- virtual bool BindToClient(OutputSurfaceClient* client) OVERRIDE;
-
- virtual const struct Capabilities& Capabilities() const OVERRIDE;
-
- virtual WebKit::WebGraphicsContext3D* Context3D() const OVERRIDE;
- virtual SoftwareOutputDevice* SoftwareDevice() const OVERRIDE;
-
+ virtual bool BindToClient(OutputSurfaceClient*) OVERRIDE;
virtual void SendFrameToParentCompositor(CompositorFrame*) OVERRIDE;
CompositorFrame& last_sent_frame() { return last_sent_frame_; }
size_t num_sent_frames() { return num_sent_frames_; }
private:
- explicit FakeOutputSurface(
- scoped_ptr<WebKit::WebGraphicsContext3D> context3d, bool has_parent);
- explicit FakeOutputSurface(
- scoped_ptr<SoftwareOutputDevice> software_device, bool has_parent);
-
- scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
- scoped_ptr<SoftwareOutputDevice> software_device_;
- struct Capabilities capabilities_;
- OutputSurfaceClient* client_;
+ FakeOutputSurface(
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
+ bool has_parent);
+
+ FakeOutputSurface(
+ scoped_ptr<SoftwareOutputDevice> software_device,
+ bool has_parent);
+
CompositorFrame last_sent_frame_;
size_t num_sent_frames_;
};
« no previous file with comments | « cc/test/DEPS ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698