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

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

Issue 2082753002: Remove some unnecessary code from BackTexture::Create. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 0ecd8f3e506f3d811d229db7e2271a16b111666a..5ac03bcaa593fdaa124b7900bb96b879b9d9cf5a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2434,27 +2434,15 @@ BackTexture::~BackTexture() {
}
void BackTexture::Create() {
+ DCHECK_EQ(id_, 0u);
ScopedGLErrorSuppressor suppressor("BackTexture::Create",
state_->GetErrorState());
- Destroy();
glGenTextures(1, &id_);
ScopedTextureBinder binder(state_, id_, GL_TEXTURE_2D);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- // TODO(apatrick): Attempt to diagnose crbug.com/97775. If SwapBuffers is
- // never called on an offscreen context, no data will ever be uploaded to the
- // saved offscreen color texture (it is deferred until to when SwapBuffers
- // is called). My idea is that some nvidia drivers might have a bug where
- // deleting a texture that has never been populated might cause a
- // crash.
- glTexImage2D(
- GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-
- bytes_allocated_ = 16u * 16u * 4u;
- memory_tracker_.TrackMemAlloc(bytes_allocated_);
}
bool BackTexture::AllocateStorage(
« 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