SkRecord: Strip out cull-skipping and y-only drawPosTextH skipping.
These optimizations are outclassed by a general bounding-box hierarchy,
and are just going to make plugging that into SkRecordDraw more complicated.
BUG=skia:
R=robertphillips@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/452983002
diff --git a/src/core/SkRecordDraw.h b/src/core/SkRecordDraw.h
index 92b94c4..a9557f4 100644
--- a/src/core/SkRecordDraw.h
+++ b/src/core/SkRecordDraw.h
@@ -27,25 +27,13 @@
void next() { ++fIndex; }
template <typename T> void operator()(const T& r) {
- if (!this->skip(r)) {
- this->draw(r);
- }
+ this->draw(r);
}
private:
// No base case, so we'll be compile-time checked that we implement all possibilities.
template <typename T> void draw(const T&);
- // skip() should return true if we can skip this command, false if not.
- // It may update fIndex directly to skip more than just this one command.
-
- // Mostly we just blindly call fCanvas and let it handle quick rejects itself.
- template <typename T> bool skip(const T&) { return false; }
-
- // We add our own quick rejects for commands added by optimizations.
- bool skip(const PairedPushCull&);
- bool skip(const BoundedDrawPosTextH&);
-
const SkMatrix fInitialCTM;
SkCanvas* fCanvas;
unsigned fIndex;