| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" | 5 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #ifndef GL_GLEXT_PROTOTYPES | 8 #ifndef GL_GLEXT_PROTOTYPES |
| 9 #define GL_GLEXT_PROTOTYPES 1 | 9 #define GL_GLEXT_PROTOTYPES 1 |
| 10 #endif | 10 #endif |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 new ::gpu::gles2::ContextGroup( | 593 new ::gpu::gles2::ContextGroup( |
| 594 NULL, NULL, NULL, bind_generates_resource))); | 594 NULL, NULL, NULL, bind_generates_resource))); |
| 595 | 595 |
| 596 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), | 596 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), |
| 597 decoder_.get(), | 597 decoder_.get(), |
| 598 decoder_.get())); | 598 decoder_.get())); |
| 599 | 599 |
| 600 decoder_->set_engine(gpu_scheduler_.get()); | 600 decoder_->set_engine(gpu_scheduler_.get()); |
| 601 | 601 |
| 602 if (is_offscreen) | 602 if (is_offscreen) |
| 603 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, size); | 603 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(size); |
| 604 else | 604 else |
| 605 surface_ = gfx::GLSurface::CreateViewGLSurface(false, window); | 605 surface_ = gfx::GLSurface::CreateViewGLSurface(window); |
| 606 | 606 |
| 607 if (!surface_.get()) { | 607 if (!surface_.get()) { |
| 608 LOG(ERROR) << "Could not create GLSurface."; | 608 LOG(ERROR) << "Could not create GLSurface."; |
| 609 Destroy(); | 609 Destroy(); |
| 610 return false; | 610 return false; |
| 611 } | 611 } |
| 612 | 612 |
| 613 if (g_use_virtualized_gl_context) { | 613 if (g_use_virtualized_gl_context) { |
| 614 context_ = share_group->GetSharedContext(); | 614 context_ = share_group->GetSharedContext(); |
| 615 if (!context_.get()) { | 615 if (!context_.get()) { |
| (...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1979 DELEGATE_TO_GL_1(waitAsyncTexImage2DCHROMIUM, WaitAsyncTexImage2DCHROMIUM, | 1979 DELEGATE_TO_GL_1(waitAsyncTexImage2DCHROMIUM, WaitAsyncTexImage2DCHROMIUM, |
| 1980 WGC3Denum) | 1980 WGC3Denum) |
| 1981 | 1981 |
| 1982 void WebGraphicsContext3DInProcessCommandBufferImpl::SetGpuMemoryBufferCreator( | 1982 void WebGraphicsContext3DInProcessCommandBufferImpl::SetGpuMemoryBufferCreator( |
| 1983 GpuMemoryBufferCreator* creator) { | 1983 GpuMemoryBufferCreator* creator) { |
| 1984 g_gpu_memory_buffer_creator = creator; | 1984 g_gpu_memory_buffer_creator = creator; |
| 1985 } | 1985 } |
| 1986 | 1986 |
| 1987 } // namespace gpu | 1987 } // namespace gpu |
| 1988 } // namespace webkit | 1988 } // namespace webkit |
| OLD | NEW |