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

Unified Diff: tools/SkBitmapRegionSampler.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
« dm/DM.cpp ('K') | « tools/SkBitmapRegionSampler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/SkBitmapRegionSampler.cpp
diff --git a/tools/SkBitmapRegionSampler.cpp b/tools/SkBitmapRegionSampler.cpp
deleted file mode 100644
index 0714c26fbf1a27c0f13c557c1941302f1a9827d9..0000000000000000000000000000000000000000
--- a/tools/SkBitmapRegionSampler.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkBitmapRegionSampler.h"
-#include "SkCodecPriv.h"
-
-SkBitmapRegionSampler::SkBitmapRegionSampler(SkImageDecoder* decoder, int width,
- int height)
- : INHERITED(width, height)
- , fDecoder(decoder)
-{}
-
-bool SkBitmapRegionSampler::decodeRegion(SkBitmap* bitmap, SkBitmap::Allocator* allocator,
- const SkIRect& desiredSubset, int sampleSize, SkColorType colorType, bool requireUnpremul) {
- fDecoder->setDitherImage(true);
- fDecoder->setPreferQualityOverSpeed(false);
- fDecoder->setRequireUnpremultipliedColors(false);
- fDecoder->setSampleSize(sampleSize);
- fDecoder->setAllocator(allocator);
-
- // kAlpha8 is the legacy representation of kGray8 used by SkImageDecoder
- if (kGray_8_SkColorType == colorType) {
- colorType = kAlpha_8_SkColorType;
- }
-
- bool result = fDecoder->decodeSubset(bitmap, desiredSubset, colorType);
- fDecoder->setAllocator(nullptr);
- return result;
-}
« dm/DM.cpp ('K') | « tools/SkBitmapRegionSampler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698