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

Unified Diff: src/pdf/SkPDFImage.cpp

Issue 17740003: remove kRLE_Index8_Config from SkBitmap (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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/gpu/SkGr.cpp ('k') | tests/BitmapCopyTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFImage.cpp
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp
index 102bd58b53486b99fc89dbd95c7ad4c2e9f62356..a5cb4c20d1b9e187948cc6654d590b219df4d686 100644
--- a/src/pdf/SkPDFImage.cpp
+++ b/src/pdf/SkPDFImage.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2010 The Android Open Source Project
*
@@ -6,13 +5,11 @@
* found in the LICENSE file.
*/
-
#include "SkPDFImage.h"
#include "SkBitmap.h"
#include "SkColor.h"
#include "SkColorPriv.h"
-#include "SkPackBits.h"
#include "SkPDFCatalog.h"
#include "SkRect.h"
#include "SkStream.h"
@@ -40,19 +37,6 @@ void extractImageData(const SkBitmap& bitmap, const SkIRect& srcRect,
}
break;
}
- case SkBitmap::kRLE_Index8_Config: {
- const int rowBytes = srcRect.width();
- image = new SkMemoryStream(rowBytes * srcRect.height());
- uint8_t* dst = (uint8_t*)image->getMemoryBase();
- const SkBitmap::RLEPixels* rle =
- (const SkBitmap::RLEPixels*)bitmap.getPixels();
- for (int y = srcRect.fTop; y < srcRect.fBottom; y++) {
- SkPackBits::Unpack8(dst, srcRect.fLeft, rowBytes,
- rle->packedAtY(y));
- dst += rowBytes;
- }
- break;
- }
case SkBitmap::kARGB_4444_Config: {
isTransparent = true;
const int rowBytes = (srcRect.width() * 3 + 1) / 2;
@@ -319,8 +303,7 @@ SkPDFImage::SkPDFImage(SkStream* imageData,
// if (!image mask) {
if (doingAlpha || alphaOnly) {
insertName("ColorSpace", "DeviceGray");
- } else if (config == SkBitmap::kIndex8_Config ||
- config == SkBitmap::kRLE_Index8_Config) {
+ } else if (config == SkBitmap::kIndex8_Config) {
SkAutoLockPixels alp(bitmap);
insert("ColorSpace",
makeIndexedColorSpace(bitmap.getColorTable()))->unref();
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | tests/BitmapCopyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698