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_graphics_context.h" |
| 6 |
| 7 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" |
| 8 |
| 9 namespace cc { |
| 10 |
| 11 PixelTestGraphicsContext::PixelTestGraphicsContext() { |
| 12 scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl> contex
t( |
| 13 new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl); |
| 14 context->Initialize(WebKit::WebGraphicsContext3D::Attributes(), NULL); |
| 15 m_context = context.PassAs<WebKit::WebGraphicsContext3D>(); |
| 16 } |
| 17 |
| 18 PixelTestGraphicsContext::~PixelTestGraphicsContext() { |
| 19 } |
| 20 |
| 21 bool PixelTestGraphicsContext::bindToClient(WebKit::WebCompositorOutputSurfaceCl
ient*) { |
| 22 return m_context->makeContextCurrent(); |
| 23 } |
| 24 |
| 25 const WebKit::WebCompositorOutputSurface::Capabilities& PixelTestGraphicsContext
::capabilities() const { |
| 26 static WebKit::WebCompositorOutputSurface::Capabilities capabilities; |
| 27 return capabilities; |
| 28 } |
| 29 |
| 30 WebKit::WebGraphicsContext3D* PixelTestGraphicsContext::context3D() const { |
| 31 return m_context.get(); |
| 32 } |
| 33 |
| 34 } // namespace cc |
OLD | NEW |