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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
6 | 6 |
7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" | 7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" |
8 | 8 |
9 #include "third_party/khronos/GLES2/gl2.h" | 9 #include "third_party/khronos/GLES2/gl2.h" |
10 #ifndef GL_GLEXT_PROTOTYPES | 10 #ifndef GL_GLEXT_PROTOTYPES |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } | 406 } |
407 | 407 |
408 bool WebGraphicsContext3DCommandBufferImpl::readBackFramebuffer( | 408 bool WebGraphicsContext3DCommandBufferImpl::readBackFramebuffer( |
409 unsigned char* pixels, | 409 unsigned char* pixels, |
410 size_t buffer_size) { | 410 size_t buffer_size) { |
411 return readBackFramebuffer(pixels, buffer_size, 0, width(), height()); | 411 return readBackFramebuffer(pixels, buffer_size, 0, width(), height()); |
412 } | 412 } |
413 | 413 |
414 void WebGraphicsContext3DCommandBufferImpl::synthesizeGLError( | 414 void WebGraphicsContext3DCommandBufferImpl::synthesizeGLError( |
415 WGC3Denum error) { | 415 WGC3Denum error) { |
416 if (find(synthetic_errors_.begin(), synthetic_errors_.end(), error) == | 416 if (std::find(synthetic_errors_.begin(), synthetic_errors_.end(), error) == |
417 synthetic_errors_.end()) { | 417 synthetic_errors_.end()) { |
418 synthetic_errors_.push_back(error); | 418 synthetic_errors_.push_back(error); |
419 } | 419 } |
420 } | 420 } |
421 | 421 |
422 void* WebGraphicsContext3DCommandBufferImpl::mapBufferSubDataCHROMIUM( | 422 void* WebGraphicsContext3DCommandBufferImpl::mapBufferSubDataCHROMIUM( |
423 WGC3Denum target, | 423 WGC3Denum target, |
424 WGC3Dintptr offset, | 424 WGC3Dintptr offset, |
425 WGC3Dsizeiptr size, | 425 WGC3Dsizeiptr size, |
426 WGC3Denum access) { | 426 WGC3Denum access) { |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 } | 1204 } |
1205 if (attributes_.shareResources) | 1205 if (attributes_.shareResources) |
1206 ClearSharedContexts(); | 1206 ClearSharedContexts(); |
1207 RenderViewImpl* renderview = | 1207 RenderViewImpl* renderview = |
1208 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; | 1208 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; |
1209 if (renderview) | 1209 if (renderview) |
1210 renderview->OnViewContextSwapBuffersAborted(); | 1210 renderview->OnViewContextSwapBuffersAborted(); |
1211 } | 1211 } |
1212 | 1212 |
1213 #endif // defined(ENABLE_GPU) | 1213 #endif // defined(ENABLE_GPU) |
OLD | NEW |