Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 10106015: Allow textures to be moved from one GL context group to another. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/khronos/GLES2/gl2ext.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" 5 #include "webkit/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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 if (!command_buffer_->Initialize()) { 392 if (!command_buffer_->Initialize()) {
393 LOG(ERROR) << "Could not initialize command buffer."; 393 LOG(ERROR) << "Could not initialize command buffer.";
394 Destroy(); 394 Destroy();
395 return false; 395 return false;
396 } 396 }
397 397
398 // TODO(gman): This needs to be true if this is Pepper. 398 // TODO(gman): This needs to be true if this is Pepper.
399 bool bind_generates_resource = false; 399 bool bind_generates_resource = false;
400 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ? 400 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ?
401 context_group->decoder_->GetContextGroup() : 401 context_group->decoder_->GetContextGroup() :
402 new ::gpu::gles2::ContextGroup(bind_generates_resource))); 402 new ::gpu::gles2::ContextGroup(NULL, bind_generates_resource)));
403 403
404 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), 404 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(),
405 decoder_.get(), 405 decoder_.get(),
406 decoder_.get())); 406 decoder_.get()));
407 407
408 decoder_->set_engine(gpu_scheduler_.get()); 408 decoder_->set_engine(gpu_scheduler_.get());
409 409
410 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1)); 410 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1));
411 411
412 if (!surface_.get()) { 412 if (!surface_.get()) {
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { 1602 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() {
1603 // TODO(kbr): improve the precision here. 1603 // TODO(kbr): improve the precision here.
1604 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; 1604 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB;
1605 if (context_lost_callback_) { 1605 if (context_lost_callback_) {
1606 context_lost_callback_->onContextLost(); 1606 context_lost_callback_->onContextLost();
1607 } 1607 }
1608 } 1608 }
1609 1609
1610 } // namespace gpu 1610 } // namespace gpu
1611 } // namespace webkit 1611 } // namespace webkit
OLDNEW
« no previous file with comments | « third_party/khronos/GLES2/gl2ext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698