aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-04-20 05:18:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-20 05:18:01 -0700
commita8ec4805db3a3cfd34926b89d6963700fb0ff0c1 (patch)
tree798019efe7410c39c38f8c336e7a5580eb068d70 /src
parentd13444acf2d6cdc13f9916309cfd3cfa314b6725 (diff)
remove dead code from SK_SUPPORT_LEGACY_BLITANTIH2V2
no image changes expected in skia or chrome/blink BUG=skia: TBR= Review URL: https://codereview.chromium.org/1050953003
Diffstat (limited to 'src')
-rw-r--r--src/core/SkBlitter.h10
-rw-r--r--src/core/SkBlitter_ARGB32.cpp6
-rw-r--r--src/core/SkCoreBlitters.h6
-rw-r--r--src/core/SkScan_Hairline.cpp28
4 files changed, 2 insertions, 48 deletions
diff --git a/src/core/SkBlitter.h b/src/core/SkBlitter.h
index 6490937701..7cf8301a4a 100644
--- a/src/core/SkBlitter.h
+++ b/src/core/SkBlitter.h
@@ -18,12 +18,6 @@
#include "SkShader.h"
#include "SkSmallAllocator.h"
-#ifdef SK_SUPPORT_LEGACY_BLITANTIH2V2
- #define SK_BLITANTIH2V2_VIRTUAL
-#else
- #define SK_BLITANTIH2V2_VIRTUAL virtual
-#endif
-
/** SkBlitter and its subclasses are responsible for actually writing pixels
into memory. Besides efficiency, they handle clipping and antialiasing.
*/
@@ -60,7 +54,7 @@ public:
virtual const SkBitmap* justAnOpaqueColor(uint32_t* value);
// (x, y), (x + 1, y)
- SK_BLITANTIH2V2_VIRTUAL void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) {
+ virtual void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) {
int16_t runs[3];
uint8_t aa[2];
@@ -73,7 +67,7 @@ public:
}
// (x, y), (x, y + 1)
- SK_BLITANTIH2V2_VIRTUAL void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) {
+ virtual void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) {
int16_t runs[2];
uint8_t aa[1];
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index caf85ddc1f..96280b7baa 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -106,7 +106,6 @@ void SkARGB32_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[],
}
}
-#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
void SkARGB32_Blitter::blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) {
uint32_t* device = fDevice.getAddr32(x, y);
SkDEBUGCODE((void)fDevice.getAddr32(x + 1, y);)
@@ -123,7 +122,6 @@ void SkARGB32_Blitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) {
device = (uint32_t*)((char*)device + fDevice.rowBytes());
device[0] = SkBlendARGB32(fPMColor, device[0], a1);
}
-#endif
//////////////////////////////////////////////////////////////////////////////////////
@@ -199,7 +197,6 @@ void SkARGB32_Opaque_Blitter::blitMask(const SkMask& mask,
}
}
-#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
void SkARGB32_Opaque_Blitter::blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) {
uint32_t* device = fDevice.getAddr32(x, y);
SkDEBUGCODE((void)fDevice.getAddr32(x + 1, y);)
@@ -216,7 +213,6 @@ void SkARGB32_Opaque_Blitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) {
device = (uint32_t*)((char*)device + fDevice.rowBytes());
device[0] = SkFastFourByteInterp(fPMColor, device[0], a1);
}
-#endif
///////////////////////////////////////////////////////////////////////////////
@@ -294,7 +290,6 @@ void SkARGB32_Black_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[],
}
}
-#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
void SkARGB32_Black_Blitter::blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) {
uint32_t* device = fDevice.getAddr32(x, y);
SkDEBUGCODE((void)fDevice.getAddr32(x + 1, y);)
@@ -311,7 +306,6 @@ void SkARGB32_Black_Blitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) {
device = (uint32_t*)((char*)device + fDevice.rowBytes());
device[0] = (a1 << SK_A32_SHIFT) + SkAlphaMulQ(device[0], 256 - a1);
}
-#endif
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/SkCoreBlitters.h b/src/core/SkCoreBlitters.h
index acc18febed..805ca92d15 100644
--- a/src/core/SkCoreBlitters.h
+++ b/src/core/SkCoreBlitters.h
@@ -120,10 +120,8 @@ public:
virtual void blitRect(int x, int y, int width, int height);
virtual void blitMask(const SkMask&, const SkIRect&);
virtual const SkBitmap* justAnOpaqueColor(uint32_t*);
-#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override;
void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override;
-#endif
protected:
SkColor fColor;
@@ -144,10 +142,8 @@ public:
SkARGB32_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint)
: INHERITED(device, paint) { SkASSERT(paint.getAlpha() == 0xFF); }
virtual void blitMask(const SkMask&, const SkIRect&);
-#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override;
void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override;
-#endif
private:
typedef SkARGB32_Blitter INHERITED;
@@ -158,10 +154,8 @@ public:
SkARGB32_Black_Blitter(const SkBitmap& device, const SkPaint& paint)
: INHERITED(device, paint) {}
virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]);
-#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override;
void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override;
-#endif
private:
typedef SkARGB32_Opaque_Blitter INHERITED;
diff --git a/src/core/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp
index 2ec051f8ab..4ed5ec254c 100644
--- a/src/core/SkScan_Hairline.cpp
+++ b/src/core/SkScan_Hairline.cpp
@@ -218,18 +218,6 @@ static void hairquad(const SkPoint pts[3], const SkRegion* clip,
SkBlitter* blitter, int level, SkScan::HairRgnProc lineproc) {
SkASSERT(level <= kMaxQuadSubdivideLevel);
-#ifdef SK_SUPPORT_LEGACY_BLITANTIH2V2
- if (level > 0) {
- SkPoint tmp[5];
-
- SkChopQuadAtHalf(pts, tmp);
- hairquad(tmp, clip, blitter, level - 1, lineproc);
- hairquad(&tmp[2], clip, blitter, level - 1, lineproc);
- } else {
- SkPoint tmp[] = { pts[0], pts[2] };
- lineproc(tmp, 2, clip, blitter);
- }
-#else
SkPoint coeff[3];
SkQuadToCoeff(pts, coeff);
@@ -250,10 +238,8 @@ static void hairquad(const SkPoint pts[3], const SkRegion* clip,
}
tmp[lines] = pts[2];
lineproc(tmp, lines + 1, clip, blitter);
-#endif
}
-#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
static inline Sk2s abs(const Sk2s& value) {
return Sk2s::Max(value, -value);
}
@@ -331,22 +317,9 @@ static void hair_cubic(const SkPoint pts[4], const SkRegion* clip, SkBlitter* bl
tmp[lines] = pts[3];
lineproc(tmp, lines + 1, clip, blitter);
}
-#endif
static inline void haircubic(const SkPoint pts[4], const SkRegion* clip,
SkBlitter* blitter, int level, SkScan::HairRgnProc lineproc) {
-#ifdef SK_SUPPORT_LEGACY_BLITANTIH2V2
- if (level > 0) {
- SkPoint tmp[7];
-
- SkChopCubicAt(pts, tmp, SK_Scalar1/2);
- haircubic(tmp, clip, blitter, level - 1, lineproc);
- haircubic(&tmp[3], clip, blitter, level - 1, lineproc);
- } else {
- SkPoint tmp[] = { pts[0], pts[3] };
- lineproc(tmp, 2, clip, blitter);
- }
-#else
if (quick_cubic_niceness_check(pts)) {
hair_cubic(pts, clip, blitter, lineproc);
} else {
@@ -358,7 +331,6 @@ static inline void haircubic(const SkPoint pts[4], const SkRegion* clip,
hair_cubic(&tmp[i * 3], clip, blitter, lineproc);
}
}
-#endif
}
static int compute_quad_level(const SkPoint pts[3]) {