| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 attribs.push_back(ALPHA_SIZE); | 334 attribs.push_back(ALPHA_SIZE); |
| 335 attribs.push_back(attributes_.alpha ? 8 : 0); | 335 attribs.push_back(attributes_.alpha ? 8 : 0); |
| 336 attribs.push_back(DEPTH_SIZE); | 336 attribs.push_back(DEPTH_SIZE); |
| 337 attribs.push_back(attributes_.depth ? 24 : 0); | 337 attribs.push_back(attributes_.depth ? 24 : 0); |
| 338 attribs.push_back(STENCIL_SIZE); | 338 attribs.push_back(STENCIL_SIZE); |
| 339 attribs.push_back(attributes_.stencil ? 8 : 0); | 339 attribs.push_back(attributes_.stencil ? 8 : 0); |
| 340 attribs.push_back(SAMPLES); | 340 attribs.push_back(SAMPLES); |
| 341 attribs.push_back(attributes_.antialias ? 4 : 0); | 341 attribs.push_back(attributes_.antialias ? 4 : 0); |
| 342 attribs.push_back(SAMPLE_BUFFERS); | 342 attribs.push_back(SAMPLE_BUFFERS); |
| 343 attribs.push_back(attributes_.antialias ? 1 : 0); | 343 attribs.push_back(attributes_.antialias ? 1 : 0); |
| 344 attribs.push_back(FAIL_IF_MAJOR_PERF_CAVEAT); |
| 345 attribs.push_back(attributes_.failIfMajorPerformanceCaveat ? 1 : 0); |
| 344 attribs.push_back(NONE); | 346 attribs.push_back(NONE); |
| 345 | 347 |
| 346 // Create a proxy to a command buffer in the GPU process. | 348 // Create a proxy to a command buffer in the GPU process. |
| 347 if (onscreen) { | 349 if (onscreen) { |
| 348 command_buffer_.reset(host_->CreateViewCommandBuffer( | 350 command_buffer_.reset(host_->CreateViewCommandBuffer( |
| 349 surface_id_, | 351 surface_id_, |
| 350 share_group, | 352 share_group, |
| 351 attribs, | 353 attribs, |
| 352 active_url_, | 354 active_url_, |
| 353 gpu_preference_)); | 355 gpu_preference_)); |
| (...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 | 1430 |
| 1429 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1431 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
| 1430 const std::string& message, int id) { | 1432 const std::string& message, int id) { |
| 1431 if (error_message_callback_) { | 1433 if (error_message_callback_) { |
| 1432 blink::WebString str = blink::WebString::fromUTF8(message.c_str()); | 1434 blink::WebString str = blink::WebString::fromUTF8(message.c_str()); |
| 1433 error_message_callback_->onErrorMessage(str, id); | 1435 error_message_callback_->onErrorMessage(str, id); |
| 1434 } | 1436 } |
| 1435 } | 1437 } |
| 1436 | 1438 |
| 1437 } // namespace content | 1439 } // namespace content |
| OLD | NEW |