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/pixel_test_output_surface.h" | |
6 | |
7 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | |
8 | |
9 namespace cc { | |
10 | |
11 PixelTestOutputSurface::PixelTestOutputSurface() { | |
12 scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl> | |
13 context(new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl); | |
14 context->Initialize(WebKit::WebGraphicsContext3D::Attributes(), NULL); | |
15 context_ = context.PassAs<WebKit::WebGraphicsContext3D>(); | |
16 } | |
17 | |
18 PixelTestOutputSurface::~PixelTestOutputSurface() { | |
19 } | |
20 | |
21 bool PixelTestOutputSurface::BindToClient(OutputSurfaceClient*) { | |
22 return context_->makeContextCurrent(); | |
23 } | |
24 | |
25 const struct OutputSurface::Capabilities& PixelTestOutputSurface::Capabilities() | |
26 const { | |
27 static struct OutputSurface::Capabilities capabilities; | |
28 return capabilities; | |
29 } | |
30 | |
31 WebKit::WebGraphicsContext3D* PixelTestOutputSurface::Context3D() const { | |
32 return context_.get(); | |
33 } | |
34 | |
35 SoftwareOutputDevice* PixelTestOutputSurface::SoftwareDevice() const { | |
36 return NULL; | |
37 } | |
38 | |
39 } // namespace cc | |
OLD | NEW |