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

Unified Diff: cc/test/fake_web_graphics_context_3d.cc

Issue 11941010: Fix scrollbars missing after lost context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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
« no previous file with comments | « cc/test/fake_web_graphics_context_3d.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_web_graphics_context_3d.cc
diff --git a/cc/test/fake_web_graphics_context_3d.cc b/cc/test/fake_web_graphics_context_3d.cc
index afcc0b198839eff724a302a83b36e15b3b0faa77..b5ee8055cf01154e4a3e8b10b806beeddf991d0c 100644
--- a/cc/test/fake_web_graphics_context_3d.cc
+++ b/cc/test/fake_web_graphics_context_3d.cc
@@ -64,8 +64,10 @@ FakeWebGraphicsContext3D::~FakeWebGraphicsContext3D() {
bool FakeWebGraphicsContext3D::makeContextCurrent() {
if (times_make_current_succeeds_ >= 0) {
- if (!times_make_current_succeeds_)
- loseContextCHROMIUM();
+ if (!times_make_current_succeeds_) {
+ loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
+ GL_INNOCENT_CONTEXT_RESET_ARB);
+ }
--times_make_current_succeeds_;
}
return !context_lost_;
@@ -355,8 +357,10 @@ void FakeWebGraphicsContext3D::bindRenderbuffer(
void FakeWebGraphicsContext3D::bindTexture(
WGC3Denum target, WebGLId texture_id) {
if (times_bind_texture_succeeds_ >= 0) {
- if (!times_bind_texture_succeeds_)
- loseContextCHROMIUM();
+ if (!times_bind_texture_succeeds_) {
+ loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
+ GL_INNOCENT_CONTEXT_RESET_ARB);
+ }
--times_bind_texture_succeeds_;
}
@@ -379,8 +383,10 @@ WGC3Dboolean FakeWebGraphicsContext3D::isQueryEXT(WebGLId query) {
void FakeWebGraphicsContext3D::endQueryEXT(WebKit::WGC3Denum target) {
if (times_end_query_succeeds_ >= 0) {
- if (!times_end_query_succeeds_)
- loseContextCHROMIUM();
+ if (!times_end_query_succeeds_) {
+ loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
+ GL_INNOCENT_CONTEXT_RESET_ARB);
+ }
--times_end_query_succeeds_;
}
}
@@ -399,7 +405,8 @@ void FakeWebGraphicsContext3D::setContextLostCallback(
context_lost_callback_ = callback;
}
-void FakeWebGraphicsContext3D::loseContextCHROMIUM() {
+void FakeWebGraphicsContext3D::loseContextCHROMIUM(WGC3Denum current,
+ WGC3Denum other) {
if (context_lost_)
return;
context_lost_ = true;
« no previous file with comments | « cc/test/fake_web_graphics_context_3d.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698