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

Unified Diff: dm/DMSrcSink.cpp

Issue 1990543002: Delete SkBitmapRegionCanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Preserve old name of tests Created 4 years, 7 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 | « dm/DMSrcSink.h ('k') | gyp/codec_android.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 1155395f4042c34745a9d86285f5f3f6bc5529fd..028dff886b444d5b54736794cd357f16b759b5ab 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -71,10 +71,8 @@ void GMSrc::modifyGrContextOptions(GrContextOptions* options) const {
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-BRDSrc::BRDSrc(Path path, SkBitmapRegionDecoder::Strategy strategy, Mode mode,
- CodecSrc::DstColorType dstColorType, uint32_t sampleSize)
+BRDSrc::BRDSrc(Path path, Mode mode, CodecSrc::DstColorType dstColorType, uint32_t sampleSize)
: fPath(path)
- , fStrategy(strategy)
, fMode(mode)
, fDstColorType(dstColorType)
, fSampleSize(sampleSize)
@@ -86,13 +84,12 @@ bool BRDSrc::veto(SinkFlags flags) const {
|| flags.approach != SinkFlags::kDirect;
}
-static SkBitmapRegionDecoder* create_brd(Path path,
- SkBitmapRegionDecoder::Strategy strategy) {
+static SkBitmapRegionDecoder* create_brd(Path path) {
SkAutoTUnref<SkData> encoded(SkData::NewFromFileName(path.c_str()));
if (!encoded) {
return NULL;
}
- return SkBitmapRegionDecoder::Create(encoded, strategy);
+ return SkBitmapRegionDecoder::Create(encoded, SkBitmapRegionDecoder::kAndroidCodec_Strategy);
}
Error BRDSrc::draw(SkCanvas* canvas) const {
@@ -115,7 +112,7 @@ Error BRDSrc::draw(SkCanvas* canvas) const {
break;
}
- SkAutoTDelete<SkBitmapRegionDecoder> brd(create_brd(fPath, fStrategy));
+ SkAutoTDelete<SkBitmapRegionDecoder> brd(create_brd(fPath));
if (nullptr == brd.get()) {
return Error::Nonfatal(SkStringPrintf("Could not create brd for %s.", fPath.c_str()));
}
@@ -217,7 +214,7 @@ Error BRDSrc::draw(SkCanvas* canvas) const {
}
SkISize BRDSrc::size() const {
- SkAutoTDelete<SkBitmapRegionDecoder> brd(create_brd(fPath, fStrategy));
+ SkAutoTDelete<SkBitmapRegionDecoder> brd(create_brd(fPath));
if (brd) {
return SkISize::Make(SkTMax(1, brd->width() / (int) fSampleSize),
SkTMax(1, brd->height() / (int) fSampleSize));
« no previous file with comments | « dm/DMSrcSink.h ('k') | gyp/codec_android.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698