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

Side by Side Diff: src/core/SkSpriteBlitter.h

Issue 1156713004: remove bitmaps entirely from sprite blits (as source) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkSpriteBlitterTemplate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9
10 #ifndef SkSpriteBlitter_DEFINED 8 #ifndef SkSpriteBlitter_DEFINED
11 #define SkSpriteBlitter_DEFINED 9 #define SkSpriteBlitter_DEFINED
12 10
13 #include "SkBitmap.h" 11 #include "SkBitmap.h"
14 #include "SkBitmapProcShader.h" 12 #include "SkBitmapProcShader.h"
15 #include "SkBlitter.h" 13 #include "SkBlitter.h"
16 #include "SkShader.h" 14 #include "SkShader.h"
17 #include "SkSmallAllocator.h" 15 #include "SkSmallAllocator.h"
18 16
19 class SkPaint; 17 class SkPaint;
20 18
21 class SkSpriteBlitter : public SkBlitter { 19 class SkSpriteBlitter : public SkBlitter {
22 public: 20 public:
23 SkSpriteBlitter(const SkBitmap& source); 21 SkSpriteBlitter(const SkPixmap& source);
24 22
25 virtual bool setup(const SkBitmap& device, int left, int top, const SkPaint& paint); 23 virtual void setup(const SkBitmap& device, int left, int top, const SkPaint& );
26 24
27 // overrides
28 #ifdef SK_DEBUG 25 #ifdef SK_DEBUG
29 virtual void blitH(int x, int y, int width); 26 void blitH(int x, int y, int width) override;
30 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int 16_t runs[]); 27 void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[] ) override;
31 virtual void blitV(int x, int y, int height, SkAlpha alpha); 28 void blitV(int x, int y, int height, SkAlpha alpha) override;
32 virtual void blitMask(const SkMask&, const SkIRect& clip); 29 void blitMask(const SkMask&, const SkIRect& clip) override;
33 #endif 30 #endif
34 31
35 static SkSpriteBlitter* ChooseD16(const SkBitmap& source, const SkPaint&, 32 static SkSpriteBlitter* ChooseD16(const SkPixmap& source, const SkPaint&, Sk TBlitterAllocator*);
36 SkTBlitterAllocator*); 33 static SkSpriteBlitter* ChooseD32(const SkPixmap& source, const SkPaint&, Sk TBlitterAllocator*);
37 static SkSpriteBlitter* ChooseD32(const SkBitmap& source, const SkPaint&,
38 SkTBlitterAllocator*);
39 34
40 protected: 35 protected:
41 const SkBitmap* fDevice; 36 const SkBitmap* fDevice;
42 const SkPixmap* fSource; 37 const SkPixmap fSource;
43 int fLeft, fTop; 38 int fLeft, fTop;
44 const SkPaint* fPaint; 39 const SkPaint* fPaint;
45
46 private:
47 SkAutoPixmapUnlock fUnlocker;
48 }; 40 };
49 41
50 #endif 42 #endif
OLDNEW
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkSpriteBlitterTemplate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698