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

Unified Diff: webkit/compositor_bindings/web_compositor_support_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
Index: webkit/compositor_bindings/web_compositor_support_output_surface.cc
diff --git a/webkit/compositor_bindings/web_compositor_support_output_surface.cc b/webkit/compositor_bindings/web_compositor_support_output_surface.cc
new file mode 100644
index 0000000000000000000000000000000000000000..12bbe9b2185104f7f80f8148d0b036c8e2011d4a
--- /dev/null
+++ b/webkit/compositor_bindings/web_compositor_support_output_surface.cc
@@ -0,0 +1,49 @@
+// Copyright (c) 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 "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
+#include "webkit/compositor_bindings/web_compositor_support_output_surface.h"
+
+namespace webkit {
+
+WebCompositorSupportOutputSurface::WebCompositorSupportOutputSurface(
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
+ context3d_ = context3d.Pass();
+}
+
+WebCompositorSupportOutputSurface::WebCompositorSupportOutputSurface(
+ scoped_ptr<cc::SoftwareOutputDevice> software_device) {
+ software_device_ = software_device.Pass();
+}
+
+WebCompositorSupportOutputSurface::~WebCompositorSupportOutputSurface() {}
+
+bool WebCompositorSupportOutputSurface::BindToClient(
+ cc::OutputSurfaceClient* client) {
+ if (!context3d_)
+ return true;
+ DCHECK(client);
+ return context3d_->makeContextCurrent();
+}
+
+const struct cc::OutputSurface::Capabilities&
+ WebCompositorSupportOutputSurface::Capabilities() const {
+ return capabilities_;
+}
+
+WebKit::WebGraphicsContext3D* WebCompositorSupportOutputSurface::Context3D() const {
+ return context3d_.get();
+}
+
+cc::SoftwareOutputDevice* WebCompositorSupportOutputSurface::SoftwareDevice() const {
+ return software_device_.get();
+}
+
+void WebCompositorSupportOutputSurface::SendFrameToParentCompositor(
+ const cc::CompositorFrame&) {
+ // No support for delegated renderers in DumpRenderTree.
+ NOTREACHED();
+}
+
+} // namespace webkit

Powered by Google App Engine
This is Rietveld 408576698