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

Unified Diff: dm/DMSrcSink.cpp

Issue 1263113002: DM: track a direct/indirect bit for each Sink too. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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') | no next file » | 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 0cd2ac93471e1b0aff2c4858689c6090bc482e5d..d1d9be030ffffb584bc537d23184965332bd92dc 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -71,11 +71,12 @@ CodecSrc::CodecSrc(Path path, Mode mode, DstColorType dstColorType, float scale)
, fScale(scale)
{}
-bool CodecSrc::veto(SinkType type) const {
- // No need to test decoding to non-raster backend.
+bool CodecSrc::veto(SinkFlags flags) const {
+ // No need to test decoding to non-raster or indirect backend.
// TODO: Once we implement GPU paths (e.g. JPEG YUV), we should use a deferred decode to
// let the GPU handle it.
- return type != kRaster_SinkType;
+ return flags.type != SinkFlags::kRaster
+ || flags.approach != SinkFlags::kDirect;
}
Error CodecSrc::draw(SkCanvas* canvas) const {
@@ -460,10 +461,11 @@ Name CodecSrc::name() const {
ImageSrc::ImageSrc(Path path, int divisor) : fPath(path), fDivisor(divisor) {}
-bool ImageSrc::veto(SinkType type) const {
- // No need to test decoding to non-raster backend.
+bool ImageSrc::veto(SinkFlags flags) const {
+ // No need to test decoding to non-raster or indirect backend.
// TODO: Instead, use lazy decoding to allow the GPU to handle cases like YUV.
- return type != kRaster_SinkType;
+ return flags.type != SinkFlags::kRaster
+ || flags.approach != SinkFlags::kDirect;
}
Error ImageSrc::draw(SkCanvas* canvas) const {
« no previous file with comments | « dm/DMSrcSink.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698