diff options
author | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-27 18:53:41 +0000 |
---|---|---|
committer | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-27 18:53:41 +0000 |
commit | e09d6f48190ee8c015fc22e9531293861bd99184 (patch) | |
tree | c6c6ade68c4d8d60c88fe24ce0055b4d072f53a3 /src/core/SkDeviceLooper.h | |
parent | 42cb6c0247894b631976fd361d46be9260b27c3b (diff) |
Revert of r10943.
Review URL: https://codereview.chromium.org/23626002
git-svn-id: http://skia.googlecode.com/svn/trunk@10944 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkDeviceLooper.h')
-rw-r--r-- | src/core/SkDeviceLooper.h | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/core/SkDeviceLooper.h b/src/core/SkDeviceLooper.h deleted file mode 100644 index fae03be82c..0000000000 --- a/src/core/SkDeviceLooper.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2013 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkDeviceLooper_DEFINED -#define SkDeviceLooper_DEFINED - -#include "SkBitmap.h" -#include "SkMatrix.h" -#include "SkRasterClip.h" - -class SkDeviceLooper { -public: - SkDeviceLooper(const SkBitmap& base, const SkRasterClip&, - const SkIRect& bounds, bool aa); - ~SkDeviceLooper(); - - const SkBitmap& getBitmap() const { - SkASSERT(kDone_State != fState); - return *fCurrBitmap; - } - - const SkRasterClip& getRC() const { - SkASSERT(kDone_State != fState); - return *fCurrRC; - } - - void mapRect(SkRect* dst, const SkRect& src) const; - void mapMatrix(SkMatrix* dst, const SkMatrix& src) const; - - bool next(); - -private: - const SkBitmap& fBaseBitmap; - const SkRasterClip& fBaseRC; - - enum State { - kDone_State, // iteration is complete, getters will assert - kSimple_State, // no translate/clip mods needed - kComplex_State - }; - - // storage for our tiled versions. Perhaps could use SkTLazy - SkBitmap fSubsetBitmap; - SkRasterClip fSubsetRC; - - const SkBitmap* fCurrBitmap; - const SkRasterClip* fCurrRC; - SkIRect fClippedBounds; - SkIPoint fCurrOffset; - int fDelta; - State fState; - - enum Delta { - kBW_Delta = 1 << 14, // 16K, gives room to spare for fixedpoint - kAA_Delta = kBW_Delta >> 2 // supersample 4x - }; - - bool fitsInDelta(const SkIRect& r) const { - return r.right() < fDelta && r.bottom() < fDelta; - } - - bool computeCurrBitmapAndClip(); -}; - -#endif |