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

Unified Diff: cc/test/fake_output_surface.h

Issue 11348371: cc: Move WebCompositorOutputSurface and related classes into cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mynits Created 8 years 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: cc/test/fake_output_surface.h
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
new file mode 100644
index 0000000000000000000000000000000000000000..dcc6f24e99cb3c10ed2a6ed4ef748cebb0eb7451
--- /dev/null
+++ b/cc/test/fake_output_surface.h
@@ -0,0 +1,50 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_
+#define CC_TEST_FAKE_OUTPUT_SURFACE_H_
+
+#include <public/WebGraphicsContext3D.h>
jamesr 2012/12/04 07:06:51 "third_party/WebKit/...." and sort with the rest o
danakj 2012/12/04 18:15:34 k, and added to DEPS
+
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+#include "cc/output_surface.h"
+#include "cc/test/fake_software_output_device.h"
+
+namespace cc {
+
+class FakeOutputSurface : public OutputSurface {
+ public:
+ virtual ~FakeOutputSurface();
+
+ static inline scoped_ptr<FakeOutputSurface> Create(scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
jamesr 2012/12/04 07:06:51 80col
+ return make_scoped_ptr(new FakeOutputSurface(context3d.Pass()));
+ }
+
+ static inline scoped_ptr<FakeOutputSurface> CreateSoftware(scoped_ptr<SoftwareOutputDevice> software_device) {
jamesr 2012/12/04 07:06:51 guess what
+ return make_scoped_ptr(new FakeOutputSurface(software_device.Pass()));
+ }
+
+ 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(const CompositorFrame&) OVERRIDE;
+
+private:
+ explicit FakeOutputSurface(scoped_ptr<WebKit::WebGraphicsContext3D> context3d);
jamesr 2012/12/04 07:06:51 1 char over :(
+ explicit FakeOutputSurface(scoped_ptr<SoftwareOutputDevice> softwareDevice);
+
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
+ scoped_ptr<SoftwareOutputDevice> software_device_;
+ struct Capabilities capabilities_;
+ OutputSurfaceClient* client_;
+};
+
+} // namespace cc
+
+#endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_

Powered by Google App Engine
This is Rietveld 408576698