OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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/output_surface.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace cc { |
| 10 |
| 11 OutputSurface::OutputSurface( |
| 12 scoped_ptr<WebKit::WebGraphicsContext3D> context3d) |
| 13 : client_(NULL), |
| 14 context3d_(context3d.Pass()) { |
| 15 } |
| 16 |
| 17 OutputSurface::OutputSurface( |
| 18 scoped_ptr<cc::SoftwareOutputDevice> software_device) |
| 19 : client_(NULL), |
| 20 software_device_(software_device.Pass()) { |
| 21 } |
| 22 |
| 23 OutputSurface::OutputSurface( |
| 24 scoped_ptr<WebKit::WebGraphicsContext3D> context3d, |
| 25 scoped_ptr<cc::SoftwareOutputDevice> software_device) |
| 26 : client_(NULL), |
| 27 context3d_(context3d.Pass()), |
| 28 software_device_(software_device.Pass()) { |
| 29 } |
| 30 |
| 31 OutputSurface::~OutputSurface() { |
| 32 } |
| 33 |
| 34 bool OutputSurface::BindToClient( |
| 35 cc::OutputSurfaceClient* client) { |
| 36 DCHECK(client); |
| 37 client_ = client; |
| 38 if (!context3d_) |
| 39 return true; |
| 40 return context3d_->makeContextCurrent(); |
| 41 } |
| 42 |
| 43 void OutputSurface::SendFrameToParentCompositor(CompositorFrame*) { |
| 44 NOTIMPLEMENTED(); |
| 45 } |
| 46 |
| 47 } // namespace cc |
OLD | NEW |