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

Unified Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merged with Tip-of-Tree Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index ea5f90d78151db78e0026a1ef679b03d66b1bf18..c1bad826b02c4dac2cf189b841d1c596086baf2a 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -64,6 +64,7 @@ WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl(
gpu_preference_(gfx::PreferIntegratedGpu),
cached_width_(0),
cached_height_(0),
+ dead_(false),
bound_fbo_(0),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
}
@@ -263,6 +264,11 @@ int WebGraphicsContext3DCommandBufferImpl::height() {
return cached_height_;
}
+void WebGraphicsContext3DCommandBufferImpl::playDead() {
+ dead_ = true;
+ OnContextLost(ContentGLContext::kInnocent);
+}
+
bool WebGraphicsContext3DCommandBufferImpl::isGLES2Compliant() {
return true;
}
@@ -757,7 +763,7 @@ WGC3Denum WebGraphicsContext3DCommandBufferImpl::getError() {
}
bool WebGraphicsContext3DCommandBufferImpl::isContextLost() {
- return initialize_failed_ ||
+ return dead_ || initialize_failed_ ||
(context_ && context_->IsCommandBufferContextLost()) ||
context_lost_reason_ != GL_NO_ERROR;
}
@@ -1150,8 +1156,8 @@ void WebGraphicsContext3DCommandBufferImpl::setContextLostCallback(
}
WGC3Denum WebGraphicsContext3DCommandBufferImpl::getGraphicsResetStatusARB() {
- if (context_->IsCommandBufferContextLost() &&
- context_lost_reason_ == GL_NO_ERROR) {
+ if (dead_ || (context_->IsCommandBufferContextLost() &&
+ context_lost_reason_ == GL_NO_ERROR)) {
return GL_UNKNOWN_CONTEXT_RESET_ARB;
}
@@ -1196,6 +1202,7 @@ WGC3Denum convertReason(ContentGLContext::ContextLostReason reason) {
void WebGraphicsContext3DCommandBufferImpl::OnContextLost(
ContentGLContext::ContextLostReason reason) {
+
context_lost_reason_ = convertReason(reason);
if (context_lost_callback_) {
context_lost_callback_->onContextLost();
« no previous file with comments | « content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698