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

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

Issue 1092483003: Revert of Speeup hairline curves (quads and cubics) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | src/core/SkBlitter_ARGB32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 SkBlitter_DEFINED 8 #ifndef SkBlitter_DEFINED
9 #define SkBlitter_DEFINED 9 #define SkBlitter_DEFINED
10 10
11 #ifdef SK_SUPPORT_LEGACY_BLITANTIH2V2
12 #define SK_BLITANTIH2V2_VIRTUAL
13 #else
14 #define SK_BLITANTIH2V2_VIRTUAL virtual
15 #endif
16
17 #include "SkBitmap.h" 11 #include "SkBitmap.h"
18 #include "SkBitmapProcShader.h" 12 #include "SkBitmapProcShader.h"
19 #include "SkMask.h" 13 #include "SkMask.h"
20 #include "SkMatrix.h" 14 #include "SkMatrix.h"
21 #include "SkPaint.h" 15 #include "SkPaint.h"
22 #include "SkRefCnt.h" 16 #include "SkRefCnt.h"
23 #include "SkRegion.h" 17 #include "SkRegion.h"
24 #include "SkShader.h" 18 #include "SkShader.h"
25 #include "SkSmallAllocator.h" 19 #include "SkSmallAllocator.h"
26 20
(...skipping 26 matching lines...) Expand all
53 /// typically used for text. 47 /// typically used for text.
54 virtual void blitMask(const SkMask&, const SkIRect& clip); 48 virtual void blitMask(const SkMask&, const SkIRect& clip);
55 49
56 /** If the blitter just sets a single value for each pixel, return the 50 /** If the blitter just sets a single value for each pixel, return the
57 bitmap it draws into, and assign value. If not, return NULL and ignore 51 bitmap it draws into, and assign value. If not, return NULL and ignore
58 the value parameter. 52 the value parameter.
59 */ 53 */
60 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value); 54 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value);
61 55
62 // (x, y), (x + 1, y) 56 // (x, y), (x + 1, y)
63 SK_BLITANTIH2V2_VIRTUAL void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) { 57 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) {
64 int16_t runs[3]; 58 int16_t runs[3];
65 uint8_t aa[2]; 59 uint8_t aa[2];
66 60
67 runs[0] = 1; 61 runs[0] = 1;
68 runs[1] = 1; 62 runs[1] = 1;
69 runs[2] = 0; 63 runs[2] = 0;
70 aa[0] = SkToU8(a0); 64 aa[0] = SkToU8(a0);
71 aa[1] = SkToU8(a1); 65 aa[1] = SkToU8(a1);
72 this->blitAntiH(x, y, aa, runs); 66 this->blitAntiH(x, y, aa, runs);
73 } 67 }
74 68
75 // (x, y), (x, y + 1) 69 // (x, y), (x, y + 1)
76 SK_BLITANTIH2V2_VIRTUAL void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) { 70 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) {
77 int16_t runs[2]; 71 int16_t runs[2];
78 uint8_t aa[1]; 72 uint8_t aa[1];
79 73
80 runs[0] = 1; 74 runs[0] = 1;
81 runs[1] = 0; 75 runs[1] = 0;
82 aa[0] = SkToU8(a0); 76 aa[0] = SkToU8(a0);
83 this->blitAntiH(x, y, aa, runs); 77 this->blitAntiH(x, y, aa, runs);
84 // reset in case the clipping blitter modified runs 78 // reset in case the clipping blitter modified runs
85 runs[0] = 1; 79 runs[0] = 1;
86 runs[1] = 0; 80 runs[1] = 0;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 SkBlitter* apply(SkBlitter* blitter, const SkRegion* clip, 235 SkBlitter* apply(SkBlitter* blitter, const SkRegion* clip,
242 const SkIRect* bounds = NULL); 236 const SkIRect* bounds = NULL);
243 237
244 private: 238 private:
245 SkNullBlitter fNullBlitter; 239 SkNullBlitter fNullBlitter;
246 SkRectClipBlitter fRectBlitter; 240 SkRectClipBlitter fRectBlitter;
247 SkRgnClipBlitter fRgnBlitter; 241 SkRgnClipBlitter fRgnBlitter;
248 }; 242 };
249 243
250 #endif 244 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBlitter_ARGB32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698