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

Unified Diff: dm/DMSrcSink.cpp

Issue 861303003: Don't test pipe modes nobody uses. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 fd9943533bc8964ed1a4586b59f08778c5cfa066..9be17d1c32c68cf080c57d6e554f989a511c9e14 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -230,25 +230,25 @@ Error ViaMatrix::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream) const
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-ViaPipe::ViaPipe(int flags, Sink* sink) : fFlags((SkGPipeWriter::Flags)flags), fSink(sink) {}
+ViaPipe::ViaPipe(Sink* sink) : fSink(sink) {}
Error ViaPipe::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream) const {
- // We turn our arguments into a Src, then draw that Src into our Sink to fill bitmap or stream.
+ // We turn ourselves into another Src that draws our argument into bitmap/stream via pipe.
struct ProxySrc : public Src {
const Src& fSrc;
- SkGPipeWriter::Flags fFlags;
- ProxySrc(const Src& src, SkGPipeWriter::Flags flags) : fSrc(src), fFlags(flags) {}
+ ProxySrc(const Src& src) : fSrc(src) {}
Error draw(SkCanvas* canvas) const SK_OVERRIDE {
SkISize size = this->size();
// TODO: is DecodeMemory really required? Might help RAM usage to be lazy if we can.
PipeController controller(canvas, &SkImageDecoder::DecodeMemory);
SkGPipeWriter pipe;
- return fSrc.draw(pipe.startRecording(&controller, fFlags, size.width(), size.height()));
+ const uint32_t kFlags = 0; // We mirror SkDeferredCanvas, which doesn't use any flags.
+ return fSrc.draw(pipe.startRecording(&controller, kFlags, size.width(), size.height()));
}
SkISize size() const SK_OVERRIDE { return fSrc.size(); }
Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one should be calling this.
- } proxy(src, fFlags);
+ } proxy(src);
return fSink->draw(proxy, bitmap, stream);
}
« 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