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

Unified Diff: content/common/gpu/image_transport_surface.cc

Issue 10910263: Don't release/make-current the non-top level texture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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: content/common/gpu/image_transport_surface.cc
diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
index 0ea39f50a1764bdfa4b73a7866e30703adeda66a..c06b1ccbba8e0a79bc8830303b6a55a548ae19ad 100644
--- a/content/common/gpu/image_transport_surface.cc
+++ b/content/common/gpu/image_transport_surface.cc
@@ -222,7 +222,8 @@ void ImageTransportHelper::Resize(gfx::Size size) {
// decoder so that future calls to MakeCurrent do not early out on the
// assumption that neither the context or surface have actually changed.
#if defined(OS_WIN)
- Decoder()->ReleaseCurrent();
+ if (handle_ != NULL)
+ Decoder()->ReleaseCurrent();
#endif
surface_->OnResize(size);
@@ -232,8 +233,10 @@ void ImageTransportHelper::Resize(gfx::Size size) {
#endif
#if defined(OS_WIN)
- Decoder()->MakeCurrent();
- SetSwapInterval(Decoder()->GetGLContext());
+ if (handle_ != NULL) {
+ Decoder()->MakeCurrent();
+ SetSwapInterval(Decoder()->GetGLContext());
+ }
#endif
}
« 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