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

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

Issue 10832264: Fix lifecycle-vs-threads of GpuVDAContext3D. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 | Annotate | Revision Log
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 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 allocation.suggest_have_backbuffer)); 1418 allocation.suggest_have_backbuffer));
1419 } 1419 }
1420 1420
1421 void WebGraphicsContext3DCommandBufferImpl::setErrorMessageCallback( 1421 void WebGraphicsContext3DCommandBufferImpl::setErrorMessageCallback(
1422 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* cb) { 1422 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* cb) {
1423 error_message_callback_ = cb; 1423 error_message_callback_ = cb;
1424 } 1424 }
1425 1425
1426 void WebGraphicsContext3DCommandBufferImpl::setContextLostCallback( 1426 void WebGraphicsContext3DCommandBufferImpl::setContextLostCallback(
1427 WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) { 1427 WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) {
1428 DCHECK(!context_lost_callback_ || !cb);
piman 2012/08/13 17:23:35 why?
Ami GONE FROM CHROMIUM 2012/08/13 17:38:16 Vestigial; was there to make sure my use of sCLC w
1428 context_lost_callback_ = cb; 1429 context_lost_callback_ = cb;
1429 } 1430 }
1430 1431
1431 WGC3Denum WebGraphicsContext3DCommandBufferImpl::getGraphicsResetStatusARB() { 1432 WGC3Denum WebGraphicsContext3DCommandBufferImpl::getGraphicsResetStatusARB() {
1432 if (IsCommandBufferContextLost() && 1433 if (IsCommandBufferContextLost() &&
1433 context_lost_reason_ == GL_NO_ERROR) { 1434 context_lost_reason_ == GL_NO_ERROR) {
1434 return GL_UNKNOWN_CONTEXT_RESET_ARB; 1435 return GL_UNKNOWN_CONTEXT_RESET_ARB;
1435 } 1436 }
1436 1437
1437 return context_lost_reason_; 1438 return context_lost_reason_;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 swap_client_->OnViewContextSwapBuffersAborted(); 1568 swap_client_->OnViewContextSwapBuffersAborted();
1568 } 1569 }
1569 1570
1570 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1571 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1571 const std::string& message, int id) { 1572 const std::string& message, int id) {
1572 if (error_message_callback_) { 1573 if (error_message_callback_) {
1573 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1574 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1574 error_message_callback_->onErrorMessage(str, id); 1575 error_message_callback_->onErrorMessage(str, id);
1575 } 1576 }
1576 } 1577 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/renderer_gpu_video_decoder_factories.h » ('j') | content/renderer/render_thread_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698