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

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

Issue 10795037: Revert 147328 - Current status of patch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « 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
11 #include <GLES2/gl2ext.h> 11 #include <GLES2/gl2ext.h>
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <set> 14 #include <set>
15 #include <string>
16 15
17 #include "base/bind.h" 16 #include "base/bind.h"
18 #include "base/bind_helpers.h" 17 #include "base/bind_helpers.h"
19 #include "base/callback.h" 18 #include "base/callback.h"
20 #include "base/command_line.h" 19 #include "base/command_line.h"
21 #include "base/lazy_instance.h" 20 #include "base/lazy_instance.h"
22 #include "base/logging.h" 21 #include "base/logging.h"
23 #include "base/memory/singleton.h" 22 #include "base/memory/singleton.h"
24 #include "base/message_loop.h" 23 #include "base/message_loop.h"
25 #include "base/metrics/histogram.h" 24 #include "base/metrics/histogram.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 if (!command_buffer_->Initialize()) { 406 if (!command_buffer_->Initialize()) {
408 LOG(ERROR) << "Could not initialize command buffer."; 407 LOG(ERROR) << "Could not initialize command buffer.";
409 Destroy(); 408 Destroy();
410 return false; 409 return false;
411 } 410 }
412 411
413 // TODO(gman): This needs to be true if this is Pepper. 412 // TODO(gman): This needs to be true if this is Pepper.
414 bool bind_generates_resource = false; 413 bool bind_generates_resource = false;
415 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ? 414 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ?
416 context_group->decoder_->GetContextGroup() : 415 context_group->decoder_->GetContextGroup() :
417 new ::gpu::gles2::ContextGroup(NULL, 416 new ::gpu::gles2::ContextGroup(NULL, bind_generates_resource)));
418 bind_generates_resource,
419 NULL)));
420 417
421 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), 418 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(),
422 decoder_.get(), 419 decoder_.get(),
423 decoder_.get())); 420 decoder_.get()));
424 421
425 decoder_->set_engine(gpu_scheduler_.get()); 422 decoder_->set_engine(gpu_scheduler_.get());
426 423
427 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1)); 424 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1));
428 425
429 if (!surface_.get()) { 426 if (!surface_.get()) {
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 if (context_lost_callback_) { 1635 if (context_lost_callback_) {
1639 context_lost_callback_->onContextLost(); 1636 context_lost_callback_->onContextLost();
1640 } 1637 }
1641 } 1638 }
1642 1639
1643 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM, 1640 DELEGATE_TO_GL_3(bindUniformLocationCHROMIUM, BindUniformLocationCHROMIUM,
1644 WebGLId, WGC3Dint, const WGC3Dchar*) 1641 WebGLId, WGC3Dint, const WGC3Dchar*)
1645 1642
1646 } // namespace gpu 1643 } // namespace gpu
1647 } // namespace webkit 1644 } // namespace webkit
OLDNEW
« no previous file with comments | « ui/gl/gl_interface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698