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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
6 #include "webkit/compositor_bindings/web_compositor_support_output_surface.h"
7
8 namespace webkit {
9
10 WebCompositorSupportOutputSurface::WebCompositorSupportOutputSurface(
11 scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
12 context3d_ = context3d.Pass();
13 }
14
15 WebCompositorSupportOutputSurface::WebCompositorSupportOutputSurface(
16 scoped_ptr<cc::SoftwareOutputDevice> software_device) {
17 software_device_ = software_device.Pass();
18 }
19
20 WebCompositorSupportOutputSurface::~WebCompositorSupportOutputSurface() {}
21
22 bool WebCompositorSupportOutputSurface::BindToClient(
23 cc::OutputSurfaceClient* client) {
24 if (!context3d_)
25 return true;
26 DCHECK(client);
27 return context3d_->makeContextCurrent();
28 }
29
30 const struct cc::OutputSurface::Capabilities&
31 WebCompositorSupportOutputSurface::Capabilities() const {
32 return capabilities_;
33 }
34
35 WebKit::WebGraphicsContext3D* WebCompositorSupportOutputSurface::Context3D() con st {
36 return context3d_.get();
37 }
38
39 cc::SoftwareOutputDevice* WebCompositorSupportOutputSurface::SoftwareDevice() co nst {
40 return software_device_.get();
41 }
42
43 void WebCompositorSupportOutputSurface::SendFrameToParentCompositor(
44 const cc::CompositorFrame&) {
45 // No support for delegated renderers in DumpRenderTree.
46 NOTREACHED();
47 }
48
49 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698