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

Unified Diff: content/browser/renderer_host/compositing_iosurface_mac.mm

Issue 9980016: Delete background tab IOSurfaces on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed auto-resize and fullscreen toggle Created 8 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 | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/compositing_iosurface_mac.mm
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.mm b/content/browser/renderer_host/compositing_iosurface_mac.mm
index f1754cf0f97593dca7eaf38fbdc46cc320bb7d3b..1786fb6917d09a6502c297cfc0f05b5c1293294c 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_mac.mm
@@ -100,11 +100,13 @@ void CompositingIOSurfaceMac::SetIOSurface(uint64 io_surface_handle) {
}
void CompositingIOSurfaceMac::DrawIOSurface(NSView* view) {
- TRACE_EVENT0("browser", "CompositingIOSurfaceMac::DrawIOSurface");
CGLSetCurrentContext(cglContext_);
bool has_io_surface = MapIOSurfaceToTexture(io_surface_handle_);
+ TRACE_EVENT1("browser", "CompositingIOSurfaceMac::DrawIOSurface",
+ "has_io_surface", has_io_surface);
+
[glContext_ setView:view];
NSSize window_size = [view frame].size;
glViewport(0, 0, window_size.width, window_size.height);
@@ -291,6 +293,11 @@ void CompositingIOSurfaceMac::UnrefIOSurfaceWithContextCurrent() {
}
io_surface_.reset();
+
+ // Forget the ID, because even if it is still around when we want to use it
+ // again, OSX may have reused the same ID for a new tab and we don't want to
+ // blit random tab contents.
+ io_surface_handle_ = 0;
}
void CompositingIOSurfaceMac::GlobalFrameDidChange() {
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698