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

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

Issue 1293123002: Revert of gpu: workaround force_cube_map_positive_x_allocation fixes Android crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 53715c4d2df3d7dcd5d0738b0ef4df8fd916521d..ed0fd10e5b1e6e1ae96fc5b0316d0be8b10290fb 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -1939,14 +1939,6 @@
return;
}
- if (texture_state->force_cube_map_positive_x_allocation) {
- if (!DoTexImage2DCubeMapPositiveXIfNeeded(
- texture_state, state->GetErrorState(), framebuffer_state,
- function_name, texture_ref, args)) {
- return;
- }
- }
-
DoTexImage(texture_state, state->GetErrorState(), framebuffer_state,
function_name, texture_ref, args);
}
@@ -1961,48 +1953,6 @@
return GL_RGBA;
}
return format;
-}
-
-// Nexus 5 crashes on allocating a cube map texture bound to FBO, if
-// the CUBE_MAP_POSITIVE_X texture is not allocated yet.
-bool TextureManager::DoTexImage2DCubeMapPositiveXIfNeeded(
- DecoderTextureState* texture_state,
- ErrorState* error_state,
- DecoderFramebufferState* framebuffer_state,
- const char* function_name,
- TextureRef* texture_ref,
- const DoTexImageArguments& args) {
- switch (args.target) {
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
- break;
- default:
- return true;
- }
-
- // ValidateTexImage is passed already.
- Texture* texture = texture_ref->texture();
- int width = 0;
- int height = 0;
- bool positive_x_level_defined = texture->GetLevelSize(
- GL_TEXTURE_CUBE_MAP_POSITIVE_X, args.level, &width, &height, nullptr);
- if (!positive_x_level_defined) {
- DoTexImageArguments positive_x_args = args;
- positive_x_args.target = GL_TEXTURE_CUBE_MAP_POSITIVE_X;
- positive_x_args.pixels = nullptr;
- if (!memory_tracker_managed_->EnsureGPUMemoryAvailable(2 *
- args.pixels_size)) {
- ERRORSTATE_SET_GL_ERROR(error_state, GL_OUT_OF_MEMORY, function_name,
- "out of memory");
- return false;
- }
- DoTexImage(texture_state, error_state, framebuffer_state, function_name,
- texture_ref, positive_x_args);
- }
- return true;
}
void TextureManager::DoTexImage(
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698