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

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: mynits 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 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(scoped_ptr<WebKit::WebGraphicsContext3D> co ntext3d) {
10 context3d_ = context3d.Pass();
11 }
12
13 FakeOutputSurface::FakeOutputSurface(scoped_ptr<SoftwareOutputDevice> softwareDe vice) {
14 software_device_ = softwareDevice.Pass();
15 }
16
17 FakeOutputSurface::~FakeOutputSurface() {}
18
19 bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
20 if (!context3d_)
21 return true;
22 DCHECK(client);
23 if (!context3d_->makeContextCurrent())
24 return false;
25 client_ = client;
26 return true;
27 }
28
29 const struct OutputSurface::Capabilities& FakeOutputSurface::Capabilities() cons t {
30 return capabilities_;
31 }
32
33 WebKit::WebGraphicsContext3D* FakeOutputSurface::Context3D() const {
34 return context3d_.get();
35 }
36
37 SoftwareOutputDevice* FakeOutputSurface::SoftwareDevice() const {
38 return software_device_.get();
39 }
40
41 void FakeOutputSurface::SendFrameToParentCompositor(const CompositorFrame&) {}
42
43 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698