| 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 } | 445 } |
| 446 | 446 |
| 447 void WebGraphicsContext3DCommandBufferImpl::setVisibilityCHROMIUM( | 447 void WebGraphicsContext3DCommandBufferImpl::setVisibilityCHROMIUM( |
| 448 bool visible) { | 448 bool visible) { |
| 449 gl_->Flush(); | 449 gl_->Flush(); |
| 450 context_->SetSurfaceVisible(visible); | 450 context_->SetSurfaceVisible(visible); |
| 451 if (!visible) | 451 if (!visible) |
| 452 gl_->FreeEverything(); | 452 gl_->FreeEverything(); |
| 453 } | 453 } |
| 454 | 454 |
| 455 void WebGraphicsContext3DCommandBufferImpl::discardFramebufferEXT() { |
| 456 } |
| 457 |
| 458 void WebGraphicsContext3DCommandBufferImpl::ensureFramebufferCHROMIUM() { |
| 459 } |
| 460 |
| 455 void WebGraphicsContext3DCommandBufferImpl:: | 461 void WebGraphicsContext3DCommandBufferImpl:: |
| 456 setMemoryAllocationChangedCallbackCHROMIUM( | 462 setMemoryAllocationChangedCallbackCHROMIUM( |
| 457 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback) { | 463 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback) { |
| 458 memory_allocation_changed_callback_ = callback; | 464 memory_allocation_changed_callback_ = callback; |
| 459 } | 465 } |
| 460 | 466 |
| 461 | 467 |
| 462 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( | 468 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( |
| 463 WebGLId texture, WebGLId parentTexture) { | 469 WebGLId texture, WebGLId parentTexture) { |
| 464 NOTIMPLEMENTED(); | 470 NOTIMPLEMENTED(); |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 } | 1246 } |
| 1241 | 1247 |
| 1242 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1248 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
| 1243 const std::string& message, int id) { | 1249 const std::string& message, int id) { |
| 1244 if (error_message_callback_) { | 1250 if (error_message_callback_) { |
| 1245 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1251 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
| 1246 error_message_callback_->onErrorMessage(str, id); | 1252 error_message_callback_->onErrorMessage(str, id); |
| 1247 } | 1253 } |
| 1248 } | 1254 } |
| 1249 | 1255 |
| OLD | NEW |