OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/compositor/test/default_context_factory.h" | 5 #include "ui/compositor/test/default_context_factory.h" |
6 | 6 |
7 #include "cc/output/output_surface.h" | 7 #include "cc/output/output_surface.h" |
8 #include "ui/compositor/reflector.h" | 8 #include "ui/compositor/reflector.h" |
9 #include "ui/gl/gl_implementation.h" | 9 #include "ui/gl/gl_implementation.h" |
10 #include "ui/gl/gl_surface.h" | 10 #include "ui/gl/gl_surface.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 if (!gfx::GLSurface::InitializeOneOff() || | 24 if (!gfx::GLSurface::InitializeOneOff() || |
25 gfx::GetGLImplementation() == gfx::kGLImplementationNone) { | 25 gfx::GetGLImplementation() == gfx::kGLImplementationNone) { |
26 LOG(ERROR) << "Could not load the GL bindings"; | 26 LOG(ERROR) << "Could not load the GL bindings"; |
27 return false; | 27 return false; |
28 } | 28 } |
29 return true; | 29 return true; |
30 } | 30 } |
31 | 31 |
32 scoped_ptr<cc::OutputSurface> DefaultContextFactory::CreateOutputSurface( | 32 scoped_ptr<cc::OutputSurface> DefaultContextFactory::CreateOutputSurface( |
33 Compositor* compositor) { | 33 Compositor* compositor) { |
34 WebKit::WebGraphicsContext3D::Attributes attrs; | 34 blink::WebGraphicsContext3D::Attributes attrs; |
35 attrs.depth = false; | 35 attrs.depth = false; |
36 attrs.stencil = false; | 36 attrs.stencil = false; |
37 attrs.antialias = false; | 37 attrs.antialias = false; |
38 attrs.shareResources = true; | 38 attrs.shareResources = true; |
39 | 39 |
40 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; | 40 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; |
41 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d( | 41 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d( |
42 WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext( | 42 WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext( |
43 attrs, compositor->widget())); | 43 attrs, compositor->widget())); |
44 CHECK(context3d); | 44 CHECK(context3d); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 return shared_main_thread_contexts_; | 92 return shared_main_thread_contexts_; |
93 } | 93 } |
94 | 94 |
95 void DefaultContextFactory::RemoveCompositor(Compositor* compositor) { | 95 void DefaultContextFactory::RemoveCompositor(Compositor* compositor) { |
96 } | 96 } |
97 | 97 |
98 bool DefaultContextFactory::DoesCreateTestContexts() { return false; } | 98 bool DefaultContextFactory::DoesCreateTestContexts() { return false; } |
99 | 99 |
100 } // namespace ui | 100 } // namespace ui |
OLD | NEW |