| Index: src/core/SkBitmapProcState.h
|
| diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h
|
| index 36e1ae02ae0a83a2d68b1a33c4a098418c213ffb..82f127db735ea3d029a28731e5dfaabe6295171f 100644
|
| --- a/src/core/SkBitmapProcState.h
|
| +++ b/src/core/SkBitmapProcState.h
|
| @@ -9,7 +9,9 @@
|
| #define SkBitmapProcState_DEFINED
|
|
|
| #include "SkBitmap.h"
|
| +#include "SkBitmapController.h"
|
| #include "SkBitmapFilter.h"
|
| +#include "SkInPlace.h"
|
| #include "SkMatrix.h"
|
| #include "SkMipMap.h"
|
| #include "SkPaint.h"
|
| @@ -23,6 +25,9 @@ typedef SkFixed3232 SkFractionalInt;
|
| class SkPaint;
|
|
|
| struct SkBitmapProcState {
|
| + SkBitmapProcState();
|
| + ~SkBitmapProcState();
|
| +
|
| typedef void (*ShaderProc32)(const SkBitmapProcState&, int x, int y,
|
| SkPMColor[], int count);
|
|
|
| @@ -49,7 +54,8 @@ struct SkBitmapProcState {
|
| typedef U16CPU (*IntTileProc)(int value, int count); // returns 0..count-1
|
|
|
| const SkBitmap* fBitmap; // chooseProcs - orig or scaled
|
| - SkMatrix fInvMatrix; // chooseProcs
|
| + SkMatrix fInvMatrix; // copy of what is in fBMState, can we remove the dup?
|
| +
|
| SkMatrix::MapXYProc fInvProc; // chooseProcs
|
|
|
| SkFractionalInt fInvSxFractionalInt;
|
| @@ -122,22 +128,18 @@ private:
|
| SampleProc16 fSampleProc16; // chooseProcs
|
|
|
| SkBitmap fOrigBitmap; // CONSTRUCTOR
|
| - SkBitmap fScaledBitmap; // chooseProcs
|
|
|
| - SkAutoTUnref<const SkMipMap> fCurrMip;
|
| -
|
| - void processHQRequest();
|
| - void processMediumRequest();
|
| + enum {
|
| + kBMStateSize = 136 // found by inspection. if too small, we will call new/delete
|
| + };
|
| + SkSInPlace<kBMStateSize> fBMAllocator;
|
| + SkBitmapController::State* fBMState;
|
|
|
| MatrixProc chooseMatrixProc(bool trivial_matrix);
|
| bool chooseProcs(const SkMatrix& inv, const SkPaint&);
|
| bool chooseScanlineProcs(bool trivialMatrix, bool clampClamp, const SkPaint& paint);
|
| ShaderProc32 chooseShaderProc32();
|
|
|
| - // returns false if we failed to "lock" the pixels at all. Typically this
|
| - // means we have to abort the shader.
|
| - bool lockBaseBitmap();
|
| -
|
| // Return false if we failed to setup for fast translate (e.g. overflow)
|
| bool setupForTranslate();
|
|
|
|
|