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

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 536003002: Hide fields in SkImageInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix qt Created 6 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 | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState.cpp
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index 2fa02947503d51763aa4bdee53008fea94d0a182..068a107153de434ae1e05478640cdeb8a2476c30 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -273,9 +273,7 @@ bool SkBitmapProcState::possiblyScaleImage() {
SkScalar invScaleFixup = level.fScale;
fInvMatrix.postScale(invScaleFixup, invScaleFixup);
- SkImageInfo info = fOrigBitmap.info();
- info.fWidth = level.fWidth;
- info.fHeight = level.fHeight;
+ const SkImageInfo info = fOrigBitmap.info().makeWH(level.fWidth, level.fHeight);
// todo: if we could wrap the fCurrMip in a pixelref, then we could just install
// that here, and not need to explicitly track it ourselves.
fScaledBitmap.installPixels(info, level.fPixels, level.fRowBytes);
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698