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

Unified Diff: cc/test/fake_output_surface.cc

Issue 11348371: cc: Move WebCompositorOutputSurface and related classes into cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forlanding6 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
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/fake_software_output_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_output_surface.cc
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6d1e972aa7e33a47bb8295b545c9ec4bf067d4e9
--- /dev/null
+++ b/cc/test/fake_output_surface.cc
@@ -0,0 +1,46 @@
+// 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.
+
+#include "cc/test/fake_output_surface.h"
+
+namespace cc {
+
+FakeOutputSurface::FakeOutputSurface(
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
+ context3d_ = context3d.Pass();
+}
+
+FakeOutputSurface::FakeOutputSurface(
+ scoped_ptr<SoftwareOutputDevice> software_device) {
+ software_device_ = software_device.Pass();
+}
+
+FakeOutputSurface::~FakeOutputSurface() {}
+
+bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
+ if (!context3d_)
+ return true;
+ DCHECK(client);
+ if (!context3d_->makeContextCurrent())
+ return false;
+ client_ = client;
+ return true;
+}
+
+const struct OutputSurface::Capabilities& FakeOutputSurface::Capabilities()
+ const {
+ return capabilities_;
+}
+
+WebKit::WebGraphicsContext3D* FakeOutputSurface::Context3D() const {
+ return context3d_.get();
+}
+
+SoftwareOutputDevice* FakeOutputSurface::SoftwareDevice() const {
+ return software_device_.get();
+}
+
+void FakeOutputSurface::SendFrameToParentCompositor(const CompositorFrame&) {}
+
+} // namespace cc
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/fake_software_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698