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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 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 "cc/test/fake_output_surface.h"
6
7 namespace cc {
8
9 FakeOutputSurface::FakeOutputSurface(
10 scoped_ptr<WebKit::WebGraphicsContext3D> context3d) {
11 context3d_ = context3d.Pass();
12 }
13
14 FakeOutputSurface::FakeOutputSurface(
15 scoped_ptr<SoftwareOutputDevice> software_device) {
16 software_device_ = software_device.Pass();
17 }
18
19 FakeOutputSurface::~FakeOutputSurface() {}
20
21 bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
22 if (!context3d_)
23 return true;
24 DCHECK(client);
25 if (!context3d_->makeContextCurrent())
26 return false;
27 client_ = client;
28 return true;
29 }
30
31 const struct OutputSurface::Capabilities& FakeOutputSurface::Capabilities()
32 const {
33 return capabilities_;
34 }
35
36 WebKit::WebGraphicsContext3D* FakeOutputSurface::Context3D() const {
37 return context3d_.get();
38 }
39
40 SoftwareOutputDevice* FakeOutputSurface::SoftwareDevice() const {
41 return software_device_.get();
42 }
43
44 void FakeOutputSurface::SendFrameToParentCompositor(const CompositorFrame&) {}
45
46 } // namespace cc
OLDNEW
« 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