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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 14456004: GPU client side changes for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Incorporate sievers' comments Created 7 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
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 "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 g_all_shared_contexts.Pointer()->empty() ? 357 g_all_shared_contexts.Pointer()->empty() ?
358 NULL : *g_all_shared_contexts.Pointer()->begin(); 358 NULL : *g_all_shared_contexts.Pointer()->begin();
359 359
360 // Create the object exposing the OpenGL API. 360 // Create the object exposing the OpenGL API.
361 real_gl_ = new gpu::gles2::GLES2Implementation( 361 real_gl_ = new gpu::gles2::GLES2Implementation(
362 gles2_helper_, 362 gles2_helper_,
363 share_group_context ? 363 share_group_context ?
364 share_group_context->GetImplementation()->share_group() : NULL, 364 share_group_context->GetImplementation()->share_group() : NULL,
365 transfer_buffer_, 365 transfer_buffer_,
366 attributes_.shareResources, 366 attributes_.shareResources,
367 bind_generates_resources_); 367 bind_generates_resources_,
368 NULL);
368 gl_ = real_gl_; 369 gl_ = real_gl_;
369 370
370 if (!real_gl_->Initialize( 371 if (!real_gl_->Initialize(
371 kStartTransferBufferSize, 372 kStartTransferBufferSize,
372 kMinTransferBufferSize, 373 kMinTransferBufferSize,
373 kMaxTransferBufferSize)) { 374 kMaxTransferBufferSize)) {
374 return false; 375 return false;
375 } 376 }
376 377
377 if (CommandLine::ForCurrentProcess()->HasSwitch( 378 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 1743
1743 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1744 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1744 const std::string& message, int id) { 1745 const std::string& message, int id) {
1745 if (error_message_callback_) { 1746 if (error_message_callback_) {
1746 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1747 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1747 error_message_callback_->onErrorMessage(str, id); 1748 error_message_callback_->onErrorMessage(str, id);
1748 } 1749 }
1749 } 1750 }
1750 1751
1751 } // namespace content 1752 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_map_image.txt » ('j') | gpu/command_buffer/client/gles2_implementation.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698