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

Unified Diff: src/codec/SkBmpRLECodec.cpp

Issue 1321433002: Add subsetting to SkScaledCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@gif-scan
Patch Set: Rebase - it compiles but I'm sure everything is broken 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 | « src/codec/SkBmpMaskCodec.cpp ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpRLECodec.cpp
diff --git a/src/codec/SkBmpRLECodec.cpp b/src/codec/SkBmpRLECodec.cpp
index b2d3ebdf5abf8fd36521fcd12206b8b22656350d..686630054fed917288381b69c674508a54e17598 100644
--- a/src/codec/SkBmpRLECodec.cpp
+++ b/src/codec/SkBmpRLECodec.cpp
@@ -196,7 +196,7 @@ size_t SkBmpRLECodec::checkForMoreData() {
void SkBmpRLECodec::setPixel(void* dst, size_t dstRowBytes,
const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
uint8_t index) {
- if (is_coord_necessary(x, fSampleX, dstInfo.width())) {
+ if (is_coord_necessary(x, fSampleX, this->subsetWidth(), this->subsetLeft())) {
// Set the row
uint32_t row = this->getDstRow(y, dstInfo.height());
@@ -229,7 +229,7 @@ void SkBmpRLECodec::setRGBPixel(void* dst, size_t dstRowBytes,
const SkImageInfo& dstInfo, uint32_t x,
uint32_t y, uint8_t red, uint8_t green,
uint8_t blue) {
- if (is_coord_necessary(x, fSampleX, dstInfo.width())) {
+ if (is_coord_necessary(x, fSampleX, this->subsetWidth(), this->subsetLeft())) {
// Set the row
uint32_t row = this->getDstRow(y, dstInfo.height());
« no previous file with comments | « src/codec/SkBmpMaskCodec.cpp ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698