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

Unified Diff: src/codec/SkCodecPriv.h

Issue 1011343003: Enabling ico decoding with use of png and bmp decoders (Closed) Base URL: https://skia.googlesource.com/skia.git@swizzle
Patch Set: Provide the user with an option of which ico to decode Created 5 years, 9 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
Index: src/codec/SkCodecPriv.h
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h
index 7c57a9fe773190bd3add08e44d02485516f70803..6048291024018b8203b360f3e37dfff93fdf6304 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -29,27 +29,21 @@
SkSwizzler::GetResult(zeroAlpha, maxAlpha);
/*
- *
* Compute row bytes for an image using pixels per byte
- *
*/
static inline size_t compute_row_bytes_ppb(int width, uint32_t pixelsPerByte) {
return (width + pixelsPerByte - 1) / pixelsPerByte;
}
/*
- *
* Compute row bytes for an image using bytes per pixel
- *
*/
static inline size_t compute_row_bytes_bpp(int width, uint32_t bytesPerPixel) {
return width * bytesPerPixel;
}
/*
- *
* Compute row bytes for an image
- *
*/
static inline size_t compute_row_bytes(int width, uint32_t bitsPerPixel) {
if (bitsPerPixel < 16) {
@@ -64,20 +58,16 @@ static inline size_t compute_row_bytes(int width, uint32_t bitsPerPixel) {
}
/*
- *
* Get a byte from a buffer
* This method is unsafe, the caller is responsible for performing a check
- *
*/
static inline uint8_t get_byte(uint8_t* buffer, uint32_t i) {
return buffer[i];
}
/*
- *
* Get a short from a buffer
* This method is unsafe, the caller is responsible for performing a check
- *
*/
static inline uint16_t get_short(uint8_t* buffer, uint32_t i) {
uint16_t result;
@@ -90,10 +80,8 @@ static inline uint16_t get_short(uint8_t* buffer, uint32_t i) {
}
/*
- *
* Get an int from a buffer
* This method is unsafe, the caller is responsible for performing a check
- *
*/
static inline uint32_t get_int(uint8_t* buffer, uint32_t i) {
uint32_t result;

Powered by Google App Engine
This is Rietveld 408576698