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

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

Issue 12220024: Fix CopyFromBackingStore giving back empty SkBitmaps on mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ifdef Created 7 years, 10 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 | content/browser/renderer_host/render_widget_host_view_browsertest.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 84441ef2ca1f7dd9d7e5c9e13721a98a3e195053..890fd8356711683a73944c2e0a8b7bfbd5c5bd09 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_mac.mm
@@ -865,11 +865,14 @@ void CompositingIOSurfaceMac::FinishCopy() {
}
glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0); CHECK_GL_ERROR();
+ // Ref so they don't get deleted in CleanupResourcesForCopy.
base::Callback<void(bool, const SkBitmap&)> callback = copy_context_.callback;
+ SkBitmap out_buf = copy_context_.out_buf;
+
CleanupResourcesForCopy();
CGLSetCurrentContext(0);
- callback.Run(buf != NULL, copy_context_.out_buf);
+ callback.Run(buf != NULL, out_buf);
}
void CompositingIOSurfaceMac::CleanupResourcesForCopy() {
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698