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

Unified Diff: cc/test/fake_web_compositor_output_surface.cc

Issue 11474050: cc: Unify namespaces for all test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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_proxy.cc ('k') | cc/test/fake_web_compositor_software_output_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_web_compositor_output_surface.cc
diff --git a/cc/test/fake_web_compositor_output_surface.cc b/cc/test/fake_web_compositor_output_surface.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7194bf7476b536fcb7b2230b44ded3fad4e46b71
--- /dev/null
+++ b/cc/test/fake_web_compositor_output_surface.cc
@@ -0,0 +1,48 @@
+// 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_web_compositor_output_surface.h"
+
+namespace cc {
+
+FakeWebCompositorOutputSurface::FakeWebCompositorOutputSurface(
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3D) {
+ m_context3D = context3D.Pass();
+}
+
+FakeWebCompositorOutputSurface::FakeWebCompositorOutputSurface(
+ scoped_ptr<WebKit::WebCompositorSoftwareOutputDevice> softwareDevice) {
+ m_softwareDevice = softwareDevice.Pass();
+}
+
+FakeWebCompositorOutputSurface::~FakeWebCompositorOutputSurface() {
+}
+
+bool FakeWebCompositorOutputSurface::bindToClient(
+ WebKit::WebCompositorOutputSurfaceClient* client) {
+ if (!m_context3D)
+ return true;
+ DCHECK(client);
+ if (!m_context3D->makeContextCurrent())
+ return false;
+ m_client = client;
+ return true;
+}
+
+const FakeWebCompositorOutputSurface::Capabilities&
+ FakeWebCompositorOutputSurface::capabilities() const {
+ return m_capabilities;
+}
+
+WebKit::WebGraphicsContext3D*
+ FakeWebCompositorOutputSurface::context3D() const {
+ return m_context3D.get();
+}
+
+WebKit::WebCompositorSoftwareOutputDevice*
+ FakeWebCompositorOutputSurface::softwareDevice() const {
+ return m_softwareDevice.get();
+}
+
+} // namespace cc
« no previous file with comments | « cc/test/fake_proxy.cc ('k') | cc/test/fake_web_compositor_software_output_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698