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

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

Issue 10534173: GPU Program Caching (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Patch Created 8 years, 6 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
« gpu/demos/framework/window.cc ('K') | « ui/gl/gl_interface.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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 if (!command_buffer_->Initialize()) { 406 if (!command_buffer_->Initialize()) {
407 LOG(ERROR) << "Could not initialize command buffer."; 407 LOG(ERROR) << "Could not initialize command buffer.";
408 Destroy(); 408 Destroy();
409 return false; 409 return false;
410 } 410 }
411 411
412 // TODO(gman): This needs to be true if this is Pepper. 412 // TODO(gman): This needs to be true if this is Pepper.
413 bool bind_generates_resource = false; 413 bool bind_generates_resource = false;
414 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ? 414 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ?
415 context_group->decoder_->GetContextGroup() : 415 context_group->decoder_->GetContextGroup() :
416 new ::gpu::gles2::ContextGroup(NULL, bind_generates_resource))); 416 new ::gpu::gles2::ContextGroup(NULL,
417 bind_generates_resource,
418 NULL)));
417 419
418 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), 420 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(),
419 decoder_.get(), 421 decoder_.get(),
420 decoder_.get())); 422 decoder_.get()));
421 423
422 decoder_->set_engine(gpu_scheduler_.get()); 424 decoder_->set_engine(gpu_scheduler_.get());
423 425
424 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1)); 426 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1));
425 427
426 if (!surface_.get()) { 428 if (!surface_.get()) {
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { 1634 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() {
1633 // TODO(kbr): improve the precision here. 1635 // TODO(kbr): improve the precision here.
1634 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; 1636 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB;
1635 if (context_lost_callback_) { 1637 if (context_lost_callback_) {
1636 context_lost_callback_->onContextLost(); 1638 context_lost_callback_->onContextLost();
1637 } 1639 }
1638 } 1640 }
1639 1641
1640 } // namespace gpu 1642 } // namespace gpu
1641 } // namespace webkit 1643 } // namespace webkit
OLDNEW
« gpu/demos/framework/window.cc ('K') | « ui/gl/gl_interface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698