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

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

Issue 14846015: Update IOSurface scale factor before compare (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment Created 7 years, 7 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/renderer_host/compositing_iosurface_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 2a723549ec4ff2b1b9ff3f37a5c23c66a12f3a0f..392793f48d8f9faba24d93dadbe6a998532c1c68 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1328,6 +1328,15 @@ void RenderWidgetHostViewMac::AcceleratedSurfaceRelease() {
bool RenderWidgetHostViewMac::HasAcceleratedSurface(
const gfx::Size& desired_size) {
+ // Update device scale factor for the IOSurface before checking if there
+ // is a match. When initially created, the IOSurface is unaware of its
+ // scale factor, which can result in compatible IOSurfaces not being used
+ // http://crbug.com/237293
+ if (compositing_iosurface_.get() &&
+ compositing_iosurface_->HasIOSurface()) {
+ compositing_iosurface_->SetDeviceScaleFactor(ScaleFactor(cocoa_view_));
Ken Russell (switch to Gerrit) 2013/05/07 19:23:51 It seems odd that this is done as a side-effect of
ccameron 2013/05/07 19:27:36 Yes, this I was unhappy with this too. The other p
+ }
+
return last_frame_was_accelerated_ &&
compositing_iosurface_.get() &&
compositing_iosurface_->HasIOSurface() &&
« no previous file with comments | « content/browser/renderer_host/compositing_iosurface_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698