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

Unified Diff: cc/test/fake_output_surface.h

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
« no previous file with comments | « cc/test/fake_layer_tree_host_client.cc ('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 a2dd67cdbff7bfa08475dc794668cc8089cda5ac..8d01183935c7f1b4f61a0abc71049c9bbdba4243 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -5,26 +5,23 @@
#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"
+#include "cc/output_surface_impl.h"
#include "cc/test/fake_web_graphics_context_3d.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
namespace cc {
-class FakeOutputSurface : public OutputSurface {
+class FakeOutputSurface : public OutputSurfaceImpl {
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 =
FakeWebGraphicsContext3D::Create(
WebKit::WebGraphicsContext3D::Attributes())
@@ -32,18 +29,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 =
FakeWebGraphicsContext3D::Create(
WebKit::WebGraphicsContext3D::Attributes())
@@ -51,45 +48,34 @@ 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 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_;
};
-static inline scoped_ptr<cc::OutputSurface> createFakeOutputSurface()
-{
- return FakeOutputSurface::Create3d(
- FakeWebGraphicsContext3D::Create(
- WebKit::WebGraphicsContext3D::Attributes())
- .PassAs<WebKit::WebGraphicsContext3D>())
- .PassAs<cc::OutputSurface>();
+static inline scoped_ptr<cc::OutputSurface> createFakeOutputSurface() {
+ return FakeOutputSurface::Create3d(
+ FakeWebGraphicsContext3D::Create(
+ WebKit::WebGraphicsContext3D::Attributes())
+ .PassAs<WebKit::WebGraphicsContext3D>())
+ .PassAs<cc::OutputSurface>();
}
} // namespace cc
« no previous file with comments | « cc/test/fake_layer_tree_host_client.cc ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698