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

Unified Diff: chrome/renderer/pepper/ppb_pdf_impl.cc

Issue 10918058: Fix PDF Viewer control loading at HiDPI scale factors (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: chrome/renderer/pepper/ppb_pdf_impl.cc
diff --git a/chrome/renderer/pepper/ppb_pdf_impl.cc b/chrome/renderer/pepper/ppb_pdf_impl.cc
index cdf787c006530994f38795c9f9fbf86e6e2f420b..057d0a6143484bd0f4b97a5712344edd9df7ca6c 100644
--- a/chrome/renderer/pepper/ppb_pdf_impl.cc
+++ b/chrome/renderer/pepper/ppb_pdf_impl.cc
@@ -349,12 +349,12 @@ PP_Resource GetResourceImageForScale(PP_Instance instance_id,
if (!content::GetHostGlobals()->GetInstance(instance_id))
return 0;
- if (!res_image_skia->HasRepresentation(scale_factor))
- return 0;
-
gfx::ImageSkiaRep image_skia_rep = res_image_skia->GetRepresentation(
scale_factor);
+ if (image_skia_rep.is_null() || image_skia_rep.scale_factor() != scale_factor)
+ return 0;
+
scoped_refptr<webkit::ppapi::PPB_ImageData_Impl> image_data(
new webkit::ppapi::PPB_ImageData_Impl(
instance_id,
« 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