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

Unified Diff: tools/SkBitmapRegionDecoder.cpp

Issue 1406033007: Delete dead BitmapRegionDecoder code in tools (Closed) Base URL: https://skia.googlesource.com/skia.git@delete-dm
Patch Set: Created 5 years, 1 month 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: tools/SkBitmapRegionDecoder.cpp
diff --git a/tools/SkBitmapRegionDecoder.cpp b/tools/SkBitmapRegionDecoder.cpp
index 5944c1ab40b5a86e536806d8bf80998d47acf8e2..7dc05059e1b76255f307cda621bc02a5d3856584 100644
--- a/tools/SkBitmapRegionDecoder.cpp
+++ b/tools/SkBitmapRegionDecoder.cpp
@@ -8,7 +8,6 @@
#include "SkBitmapRegionCanvas.h"
#include "SkBitmapRegionCodec.h"
#include "SkBitmapRegionDecoder.h"
-#include "SkBitmapRegionSampler.h"
#include "SkAndroidCodec.h"
#include "SkCodec.h"
#include "SkCodecPriv.h"
@@ -24,20 +23,6 @@ SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create(
SkStreamRewindable* stream, Strategy strategy) {
SkAutoTDelete<SkStreamRewindable> streamDeleter(stream);
switch (strategy) {
- case kOriginal_Strategy: {
- SkImageDecoder* decoder = SkImageDecoder::Factory(streamDeleter);
- int width, height;
- if (nullptr == decoder) {
- SkCodecPrintf("Error: Could not create image decoder.\n");
- return nullptr;
- }
- if (!decoder->buildTileIndex(streamDeleter.detach(), &width, &height)) {
- SkCodecPrintf("Error: Could not build tile index.\n");
- delete decoder;
- return nullptr;
- }
- return new SkBitmapRegionSampler(decoder, width, height);
- }
case kCanvas_Strategy: {
SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(streamDeleter.detach()));
if (nullptr == codec) {
« dm/DM.cpp ('K') | « tools/SkBitmapRegionDecoder.h ('k') | tools/SkBitmapRegionSampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698