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

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

Issue 213743003: Pass GL context bind_generates_resources flag to GPU Service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix component build link error. Created 6 years, 8 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 attribs.push_back(DEPTH_SIZE); 343 attribs.push_back(DEPTH_SIZE);
344 attribs.push_back(attributes_.depth ? 24 : 0); 344 attribs.push_back(attributes_.depth ? 24 : 0);
345 attribs.push_back(STENCIL_SIZE); 345 attribs.push_back(STENCIL_SIZE);
346 attribs.push_back(attributes_.stencil ? 8 : 0); 346 attribs.push_back(attributes_.stencil ? 8 : 0);
347 attribs.push_back(SAMPLES); 347 attribs.push_back(SAMPLES);
348 attribs.push_back(attributes_.antialias ? 4 : 0); 348 attribs.push_back(attributes_.antialias ? 4 : 0);
349 attribs.push_back(SAMPLE_BUFFERS); 349 attribs.push_back(SAMPLE_BUFFERS);
350 attribs.push_back(attributes_.antialias ? 1 : 0); 350 attribs.push_back(attributes_.antialias ? 1 : 0);
351 attribs.push_back(FAIL_IF_MAJOR_PERF_CAVEAT); 351 attribs.push_back(FAIL_IF_MAJOR_PERF_CAVEAT);
352 attribs.push_back(attributes_.failIfMajorPerformanceCaveat ? 1 : 0); 352 attribs.push_back(attributes_.failIfMajorPerformanceCaveat ? 1 : 0);
353 attribs.push_back(BIND_GENERATES_RESOURCES);
354 attribs.push_back(bind_generates_resources_ ? 1 : 0);
353 attribs.push_back(NONE); 355 attribs.push_back(NONE);
354 356
355 // Create a proxy to a command buffer in the GPU process. 357 // Create a proxy to a command buffer in the GPU process.
356 if (onscreen) { 358 if (onscreen) {
357 command_buffer_.reset(host_->CreateViewCommandBuffer( 359 command_buffer_.reset(host_->CreateViewCommandBuffer(
358 surface_id_, 360 surface_id_,
359 share_group_command_buffer, 361 share_group_command_buffer,
360 attribs, 362 attribs,
361 active_url_, 363 active_url_,
362 gpu_preference_)); 364 gpu_preference_));
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 1393
1392 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1394 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1393 const std::string& message, int id) { 1395 const std::string& message, int id) {
1394 if (error_message_callback_) { 1396 if (error_message_callback_) {
1395 blink::WebString str = blink::WebString::fromUTF8(message.c_str()); 1397 blink::WebString str = blink::WebString::fromUTF8(message.c_str());
1396 error_message_callback_->onErrorMessage(str, id); 1398 error_message_callback_->onErrorMessage(str, id);
1397 } 1399 }
1398 } 1400 }
1399 1401
1400 } // namespace content 1402 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | content/common/gpu/gpu_command_buffer_stub.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698