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

Unified Diff: cc/output_surface.cc

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/output_surface.h ('k') | cc/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output_surface.cc
diff --git a/cc/output_surface.cc b/cc/output_surface.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b48923226a8593d28b1c2adfb3c29d35f9f8b6db
--- /dev/null
+++ b/cc/output_surface.cc
@@ -0,0 +1,47 @@
+// Copyright (c) 2013 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/output_surface.h"
+
+#include "base/logging.h"
+
+namespace cc {
+
+OutputSurface::OutputSurface(
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3d)
+ : client_(NULL),
+ context3d_(context3d.Pass()) {
+}
+
+OutputSurface::OutputSurface(
+ scoped_ptr<cc::SoftwareOutputDevice> software_device)
+ : client_(NULL),
+ software_device_(software_device.Pass()) {
+}
+
+OutputSurface::OutputSurface(
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
+ scoped_ptr<cc::SoftwareOutputDevice> software_device)
+ : client_(NULL),
+ context3d_(context3d.Pass()),
+ software_device_(software_device.Pass()) {
+}
+
+OutputSurface::~OutputSurface() {
+}
+
+bool OutputSurface::BindToClient(
+ cc::OutputSurfaceClient* client) {
+ DCHECK(client);
+ client_ = client;
+ if (!context3d_)
+ return true;
+ return context3d_->makeContextCurrent();
+}
+
+void OutputSurface::SendFrameToParentCompositor(CompositorFrame*) {
+ NOTIMPLEMENTED();
+}
+
+} // namespace cc
« no previous file with comments | « cc/output_surface.h ('k') | cc/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698