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

Unified Diff: src/core/SkDeviceLooper.h

Issue 23626002: Revert of r10943. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 | « gyp/core.gypi ('k') | src/core/SkDeviceLooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDeviceLooper.h
===================================================================
--- src/core/SkDeviceLooper.h (revision 10943)
+++ src/core/SkDeviceLooper.h (working copy)
@@ -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
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkDeviceLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698