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

Unified Diff: bench/subset/SubsetTranslateBench.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 | « bench/subset/SubsetSingleBench.cpp ('k') | bench/subset/SubsetZoomBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/subset/SubsetTranslateBench.cpp
diff --git a/bench/subset/SubsetTranslateBench.cpp b/bench/subset/SubsetTranslateBench.cpp
index d13f31a86d1e90f7a4b099ea5a95a25aa50a4742..f6f3d4b22290998a11e4881addae2ee5239b8b2c 100644
--- a/bench/subset/SubsetTranslateBench.cpp
+++ b/bench/subset/SubsetTranslateBench.cpp
@@ -91,8 +91,8 @@ void SubsetTranslateBench::onDraw(int n, SkCanvas* canvas) {
codec->startScanlineDecode(info, nullptr, get_colors(&bitmap), &colorCount);
SkASSERT(SkCodec::kSuccess == result);
- SkDEBUGCODE(result =) codec->skipScanlines(y);
- SkASSERT(SkCodec::kSuccess == result);
+ SkDEBUGCODE(int lines =) codec->skipScanlines(y);
+ SkASSERT(y == lines);
const uint32_t currSubsetWidth =
x + (int) fSubsetWidth > info.width() ?
@@ -104,8 +104,8 @@ void SubsetTranslateBench::onDraw(int n, SkCanvas* canvas) {
switch (codec->getScanlineOrder()) {
case SkCodec::kTopDown_SkScanlineOrder:
for (uint32_t y = 0; y < currSubsetHeight; y++) {
- SkDEBUGCODE(result =) codec->getScanlines(row.get(), 1, 0);
- SkASSERT(SkCodec::kSuccess == result);
+ SkDEBUGCODE(lines =) codec->getScanlines(row.get(), 1, 0);
+ SkASSERT(1 == lines);
memcpy(bitmap.getAddr(0, y), row.get() + x * bpp,
currSubsetWidth * bpp);
@@ -118,9 +118,9 @@ void SubsetTranslateBench::onDraw(int n, SkCanvas* canvas) {
SkBitmap stripeBm;
alloc_pixels(&stripeBm, stripeInfo, colors, colorCount);
- SkDEBUGCODE(result =) codec->getScanlines(stripeBm.getPixels(),
+ SkDEBUGCODE(lines =) codec->getScanlines(stripeBm.getPixels(),
currSubsetHeight, stripeBm.rowBytes());
- SkASSERT(SkCodec::kSuccess == result);
+ SkASSERT(currSubsetHeight == (uint32_t) lines);
for (uint32_t subsetY = 0; subsetY < currSubsetHeight; subsetY++) {
memcpy(bitmap.getAddr(0, subsetY), stripeBm.getAddr(x, subsetY),
« no previous file with comments | « bench/subset/SubsetSingleBench.cpp ('k') | bench/subset/SubsetZoomBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698