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

Unified Diff: bench/WritePixelsBench.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 | « no previous file | bench/nanobench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/WritePixelsBench.cpp
diff --git a/bench/WritePixelsBench.cpp b/bench/WritePixelsBench.cpp
index 5138375ffbae41f428fd9b2758f8c5c0b170d09d..88b2e62ca59c3f31d447058adf853449db760cd6 100644
--- a/bench/WritePixelsBench.cpp
+++ b/bench/WritePixelsBench.cpp
@@ -54,9 +54,7 @@ protected:
bmp.allocN32Pixels(size.width(), size.height());
canvas->readPixels(&bmp, 0, 0);
- SkImageInfo info = bmp.info();
- info.fColorType = fColorType;
- info.fAlphaType = fAlphaType;
+ SkImageInfo info = SkImageInfo::Make(bmp.width(), bmp.height(), fColorType, fAlphaType);
for (int loop = 0; loop < loops; ++loop) {
canvas->writePixels(info, bmp.getPixels(), bmp.rowBytes(), 0, 0);
« no previous file with comments | « no previous file | bench/nanobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698