aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-10-30 15:03:13 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-30 19:27:03 +0000
commit1b361150239a2ae79979a5bab5c35dfa0c5adb9c (patch)
tree94ce53841c264e5fb209c3f42dad291443dbedf9 /dm
parent65c7f662ba4ec1c78dc5fc67b184ee9c7b614f55 (diff)
make color rotating a little less pointlessly slow
Change-Id: Ic9e6cfe82dd22ac01be7a51724efa4c00399cfef Reviewed-on: https://skia-review.googlesource.com/65320 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'dm')
-rw-r--r--dm/DMSrcSink.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 0968aca705..8e36f0c669 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -2165,14 +2165,14 @@ Error ViaCSXform::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkSt
pixels.allocPixels(canvas->imageInfo());
canvas->readPixels(pixels, 0, 0);
for (int y = 0; y < pixels.height(); y++) {
+ uint32_t* row = pixels.getAddr32(0,y);
for (int x = 0; x < pixels.width(); x++) {
- uint32_t pixel = *pixels.getAddr32(x, y);
+ uint32_t pixel = *row;
uint8_t r = SkGetPackedR32(pixel);
uint8_t g = SkGetPackedG32(pixel);
uint8_t b = SkGetPackedB32(pixel);
uint8_t a = SkGetPackedA32(pixel);
- *pixels.getAddr32(x, y) =
- SkSwizzle_RGBA_to_PMColor(b << 0 | r << 8 | g << 16 | a << 24);
+ *row++ = SkSwizzle_RGBA_to_PMColor(b << 0 | r << 8 | g << 16 | a << 24);
}
}