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

Unified Diff: ui/gfx/image/image_unittest_util_ios.mm

Issue 2945213002: [ios] Snapshot for WebState (Closed)
Patch Set: Address comments. Created 3 years, 6 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
Index: ui/gfx/image/image_unittest_util_ios.mm
diff --git a/ui/gfx/image/image_unittest_util_ios.mm b/ui/gfx/image/image_unittest_util_ios.mm
index 56266178cf010a055ccb0225c1932d7a3509199c..a0e7587d0806467125690b5bebfca5b6e02ab6b3 100644
--- a/ui/gfx/image/image_unittest_util_ios.mm
+++ b/ui/gfx/image/image_unittest_util_ios.mm
@@ -14,8 +14,9 @@ namespace test {
SkColor GetPlatformImageColor(PlatformImage image, int x, int y) {
// Start by extracting the target pixel into a 1x1 CGImage.
- base::ScopedCFTypeRef<CGImageRef> pixel_image(
- CGImageCreateWithImageInRect(image.CGImage, CGRectMake(x, y, 1, 1)));
+
+ base::ScopedCFTypeRef<CGImageRef> pixel_image(CGImageCreateWithImageInRect(
+ image.CGImage, CGRectMake(x * image.scale, y * image.scale, 1, 1)));
edchin 2017/06/23 19:03:10 I will pull this out into a separate CL and commen
// Draw that pixel into a 1x1 bitmap context.
base::ScopedCFTypeRef<CGColorSpaceRef> color_space(
« ios/web/public/test/fakes/test_web_state.h ('K') | « ios/web/web_state/web_state_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698