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

Unified Diff: gpu/command_buffer/service/texture_definition.cc

Issue 1115043003: Handle currently bound texture id in PowerVR workaround (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GL_TEXTURE_BINDING_2D Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_definition.cc
diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc
index a5fe1d388deee2fef9c3095ca42371eee0fef590..d81d2583b39b650f5c27b97d41b034d26e0cd73c 100644
--- a/gpu/command_buffer/service/texture_definition.cc
+++ b/gpu/command_buffer/service/texture_definition.cc
@@ -411,6 +411,13 @@ void TextureDefinition::UpdateTexture(Texture* texture) const {
glGenTextures(1, &service_id);
old_service_id = texture->service_id();
texture->SetServiceId(service_id);
+
+ DCHECK_EQ(static_cast<GLenum>(GL_TEXTURE_2D), target_);
+ GLint bound_id = 0;
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &bound_id);
+ if (bound_id == static_cast<GLint>(old_service_id)) {
+ glBindTexture(target_, service_id);
+ }
}
UpdateTextureInternal(texture);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698