OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |