| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2006 The Android Open Source Project | 2  * Copyright 2006 The Android Open Source Project | 
| 3  * | 3  * | 
| 4  * Use of this source code is governed by a BSD-style license that can be | 4  * Use of this source code is governed by a BSD-style license that can be | 
| 5  * found in the LICENSE file. | 5  * found in the LICENSE file. | 
| 6  */ | 6  */ | 
| 7 | 7 | 
| 8 #ifndef SkSpriteBlitter_DEFINED | 8 #ifndef SkSpriteBlitter_DEFINED | 
| 9 #define SkSpriteBlitter_DEFINED | 9 #define SkSpriteBlitter_DEFINED | 
| 10 | 10 | 
| 11 #include "SkBitmap.h" |  | 
| 12 #include "SkBitmapProcShader.h" |  | 
| 13 #include "SkBlitter.h" | 11 #include "SkBlitter.h" | 
|  | 12 #include "SkPixmap.h" | 
| 14 #include "SkShader.h" | 13 #include "SkShader.h" | 
| 15 #include "SkSmallAllocator.h" | 14 #include "SkSmallAllocator.h" | 
| 16 | 15 | 
| 17 class SkPaint; | 16 class SkPaint; | 
| 18 | 17 | 
| 19 class SkSpriteBlitter : public SkBlitter { | 18 class SkSpriteBlitter : public SkBlitter { | 
| 20 public: | 19 public: | 
| 21     SkSpriteBlitter(const SkPixmap& source); | 20     SkSpriteBlitter(const SkPixmap& source); | 
| 22 | 21 | 
| 23     virtual void setup(const SkBitmap& device, int left, int top, const SkPaint&
    ); | 22     virtual void setup(const SkPixmap& dst, int left, int top, const SkPaint&); | 
| 24 | 23 | 
| 25 #ifdef SK_DEBUG | 24 #ifdef SK_DEBUG | 
| 26     void blitH(int x, int y, int width) override; | 25     void blitH(int x, int y, int width) override; | 
| 27     void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]
    ) override; | 26     void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]
    ) override; | 
| 28     void blitV(int x, int y, int height, SkAlpha alpha) override; | 27     void blitV(int x, int y, int height, SkAlpha alpha) override; | 
| 29     void blitMask(const SkMask&, const SkIRect& clip) override; | 28     void blitMask(const SkMask&, const SkIRect& clip) override; | 
| 30 #endif | 29 #endif | 
| 31 | 30 | 
| 32     static SkSpriteBlitter* ChooseD16(const SkPixmap& source, const SkPaint&, Sk
    TBlitterAllocator*); | 31     static SkSpriteBlitter* ChooseD16(const SkPixmap& source, const SkPaint&, Sk
    TBlitterAllocator*); | 
| 33     static SkSpriteBlitter* ChooseD32(const SkPixmap& source, const SkPaint&, Sk
    TBlitterAllocator*); | 32     static SkSpriteBlitter* ChooseD32(const SkPixmap& source, const SkPaint&, Sk
    TBlitterAllocator*); | 
| 34 | 33 | 
| 35 protected: | 34 protected: | 
| 36     const SkBitmap* fDevice; | 35     SkPixmap        fDst; | 
| 37     const SkPixmap  fSource; | 36     const SkPixmap  fSource; | 
| 38     int             fLeft, fTop; | 37     int             fLeft, fTop; | 
| 39     const SkPaint*  fPaint; | 38     const SkPaint*  fPaint; | 
| 40 }; | 39 }; | 
| 41 | 40 | 
| 42 #endif | 41 #endif | 
| OLD | NEW | 
|---|