| OLD | NEW | 
|---|
| (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 | 
| OLD | NEW | 
|---|