OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef SkAAClip_DEFINED | 9 #ifndef SkAAClip_DEFINED |
10 #define SkAAClip_DEFINED | 10 #define SkAAClip_DEFINED |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 SkAAClipBlitter() : fScanlineScratch(NULL) {} | 102 SkAAClipBlitter() : fScanlineScratch(NULL) {} |
103 virtual ~SkAAClipBlitter(); | 103 virtual ~SkAAClipBlitter(); |
104 | 104 |
105 void init(SkBlitter* blitter, const SkAAClip* aaclip) { | 105 void init(SkBlitter* blitter, const SkAAClip* aaclip) { |
106 SkASSERT(aaclip && !aaclip->isEmpty()); | 106 SkASSERT(aaclip && !aaclip->isEmpty()); |
107 fBlitter = blitter; | 107 fBlitter = blitter; |
108 fAAClip = aaclip; | 108 fAAClip = aaclip; |
109 fAAClipBounds = aaclip->getBounds(); | 109 fAAClipBounds = aaclip->getBounds(); |
110 } | 110 } |
111 | 111 |
112 virtual void blitH(int x, int y, int width) SK_OVERRIDE; | 112 void blitH(int x, int y, int width) SK_OVERRIDE; |
113 virtual void blitAntiH(int x, int y, const SkAlpha[], | 113 virtual void blitAntiH(int x, int y, const SkAlpha[], |
114 const int16_t runs[]) SK_OVERRIDE; | 114 const int16_t runs[]) SK_OVERRIDE; |
115 virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; | 115 void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; |
116 virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE; | 116 void blitRect(int x, int y, int width, int height) SK_OVERRIDE; |
117 virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE; | 117 void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE; |
118 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE; | 118 const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE; |
119 | 119 |
120 private: | 120 private: |
121 SkBlitter* fBlitter; | 121 SkBlitter* fBlitter; |
122 const SkAAClip* fAAClip; | 122 const SkAAClip* fAAClip; |
123 SkIRect fAAClipBounds; | 123 SkIRect fAAClipBounds; |
124 | 124 |
125 // point into fScanlineScratch | 125 // point into fScanlineScratch |
126 int16_t* fRuns; | 126 int16_t* fRuns; |
127 SkAlpha* fAA; | 127 SkAlpha* fAA; |
128 | 128 |
129 enum { | 129 enum { |
130 kSize = 32 * 32 | 130 kSize = 32 * 32 |
131 }; | 131 }; |
132 SkAutoSMalloc<kSize> fGrayMaskScratch; // used for blitMask | 132 SkAutoSMalloc<kSize> fGrayMaskScratch; // used for blitMask |
133 void* fScanlineScratch; // enough for a mask at 32bit, or runs+aa | 133 void* fScanlineScratch; // enough for a mask at 32bit, or runs+aa |
134 | 134 |
135 void ensureRunsAndAA(); | 135 void ensureRunsAndAA(); |
136 }; | 136 }; |
137 | 137 |
138 #endif | 138 #endif |
OLD | NEW |