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

Unified Diff: sky/engine/platform/graphics/skia/NativeImageSkia.cpp

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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 | « sky/engine/platform/graphics/ReplayingCanvas.h ('k') | testing/buildbot/chromium.fyi.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/graphics/skia/NativeImageSkia.cpp
diff --git a/sky/engine/platform/graphics/skia/NativeImageSkia.cpp b/sky/engine/platform/graphics/skia/NativeImageSkia.cpp
index 86160de73e6290cf37204ec9b23d59651095ba40..a0831a44fe8f04d3d078ac0b4d0719c085fe8d84 100644
--- a/sky/engine/platform/graphics/skia/NativeImageSkia.cpp
+++ b/sky/engine/platform/graphics/skia/NativeImageSkia.cpp
@@ -91,12 +91,14 @@ SkBitmap NativeImageSkia::extractScaledImageFragment(const SkRect& srcRect, floa
scaleTransform.setRectToRect(imageRect, scaledImageRect, SkMatrix::kFill_ScaleToFit);
scaleTransform.mapRect(scaledSrcRect, srcRect);
- scaledSrcRect->intersect(scaledImageRect);
+ bool ok = scaledSrcRect->intersect(scaledImageRect);
+ ASSERT_UNUSED(ok, ok);
SkIRect enclosingScaledSrcRect = enclosingIntRect(*scaledSrcRect);
// |enclosingScaledSrcRect| can be larger than |scaledImageSize| because
// of float inaccuracy so clip to get inside.
- enclosingScaledSrcRect.intersect(SkIRect::MakeSize(scaledImageSize));
+ ok = enclosingScaledSrcRect.intersect(SkIRect::MakeSize(scaledImageSize));
+ ASSERT_UNUSED(ok, ok);
// scaledSrcRect is relative to the pixel snapped fragment we're extracting.
scaledSrcRect->offset(-enclosingScaledSrcRect.x(), -enclosingScaledSrcRect.y());
« no previous file with comments | « sky/engine/platform/graphics/ReplayingCanvas.h ('k') | testing/buildbot/chromium.fyi.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698