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

Side by Side Diff: cc/test/fake_output_surface.cc

Issue 11464007: Add the DelegatingRenderer class with its initialize path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initialize() 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
« cc/delegating_renderer.cc ('K') | « cc/test/fake_output_surface.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/fake_output_surface.h" 5 #include "cc/test/fake_output_surface.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 FakeOutputSurface::FakeOutputSurface( 9 FakeOutputSurface::FakeOutputSurface(
10 scoped_ptr<WebKit::WebGraphicsContext3D> context3d) { 10 scoped_ptr<WebKit::WebGraphicsContext3D> context3d, bool has_parent) {
11 context3d_ = context3d.Pass(); 11 context3d_ = context3d.Pass();
12 capabilities_.has_parent_compositor = has_parent;
12 } 13 }
13 14
14 FakeOutputSurface::FakeOutputSurface( 15 FakeOutputSurface::FakeOutputSurface(
15 scoped_ptr<SoftwareOutputDevice> software_device) { 16 scoped_ptr<SoftwareOutputDevice> software_device, bool has_parent) {
16 software_device_ = software_device.Pass(); 17 software_device_ = software_device.Pass();
18 capabilities_.has_parent_compositor = has_parent;
17 } 19 }
18 20
19 FakeOutputSurface::~FakeOutputSurface() {} 21 FakeOutputSurface::~FakeOutputSurface() {}
20 22
21 bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) { 23 bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
22 if (!context3d_) 24 if (!context3d_)
23 return true; 25 return true;
24 DCHECK(client); 26 DCHECK(client);
25 if (!context3d_->makeContextCurrent()) 27 if (!context3d_->makeContextCurrent())
26 return false; 28 return false;
(...skipping 10 matching lines...) Expand all
37 return context3d_.get(); 39 return context3d_.get();
38 } 40 }
39 41
40 SoftwareOutputDevice* FakeOutputSurface::SoftwareDevice() const { 42 SoftwareOutputDevice* FakeOutputSurface::SoftwareDevice() const {
41 return software_device_.get(); 43 return software_device_.get();
42 } 44 }
43 45
44 void FakeOutputSurface::SendFrameToParentCompositor(const CompositorFrame&) {} 46 void FakeOutputSurface::SendFrameToParentCompositor(const CompositorFrame&) {}
45 47
46 } // namespace cc 48 } // namespace cc
OLDNEW
« cc/delegating_renderer.cc ('K') | « cc/test/fake_output_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698