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

Unified Diff: bench/subset/SubsetSingleBench.cpp

Issue 1332053002: Fill incomplete images in SkCodec parent class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use aligned memory in swizzler test Created 5 years, 2 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/subset/SubsetTranslateBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/subset/SubsetSingleBench.cpp
diff --git a/bench/subset/SubsetSingleBench.cpp b/bench/subset/SubsetSingleBench.cpp
index 735effa100bad08d9fe453aa2ed47eb06eaac343..b4e92e4e2257882a6d47178414ead89ba964b269 100644
--- a/bench/subset/SubsetSingleBench.cpp
+++ b/bench/subset/SubsetSingleBench.cpp
@@ -75,8 +75,8 @@ void SubsetSingleBench::onDraw(int n, SkCanvas* canvas) {
SkImageInfo subsetInfo = info.makeWH(fSubsetWidth, fSubsetHeight);
alloc_pixels(&bitmap, subsetInfo, colors, colorCount);
- SkDEBUGCODE(result = ) codec->skipScanlines(fOffsetTop);
- SkASSERT(result == SkCodec::kSuccess);
+ SkDEBUGCODE(int lines = ) codec->skipScanlines(fOffsetTop);
+ SkASSERT((uint32_t) lines == fOffsetTop);
const uint32_t bpp = info.bytesPerPixel();
@@ -84,8 +84,8 @@ void SubsetSingleBench::onDraw(int n, SkCanvas* canvas) {
case SkCodec::kTopDown_SkScanlineOrder: {
SkAutoTDeleteArray<uint8_t> row(new uint8_t[info.minRowBytes()]);
for (uint32_t y = 0; y < fSubsetHeight; y++) {
- SkDEBUGCODE(result = ) codec->getScanlines(row.get(), 1, 0);
- SkASSERT(result == SkCodec::kSuccess);
+ SkDEBUGCODE(lines = ) codec->getScanlines(row.get(), 1, 0);
+ SkASSERT(lines == 1);
memcpy(bitmap.getAddr(0, y), row.get() + fOffsetLeft * bpp,
fSubsetWidth * bpp);
@@ -99,9 +99,9 @@ void SubsetSingleBench::onDraw(int n, SkCanvas* canvas) {
SkBitmap stripeBm;
alloc_pixels(&stripeBm, stripeInfo, colors, colorCount);
- SkDEBUGCODE(result = ) codec->getScanlines(stripeBm.getPixels(), fSubsetHeight,
+ SkDEBUGCODE(lines = ) codec->getScanlines(stripeBm.getPixels(), fSubsetHeight,
stripeBm.rowBytes());
- SkASSERT(result == SkCodec::kSuccess);
+ SkASSERT((uint32_t) lines == fSubsetHeight);
for (uint32_t y = 0; y < fSubsetHeight; y++) {
memcpy(bitmap.getAddr(0, y), stripeBm.getAddr(fOffsetLeft, y),
« no previous file with comments | « no previous file | bench/subset/SubsetTranslateBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698