aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-26 16:47:10 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-26 16:47:10 +0000
commit5f0add3ad6e1d6129307276c81ba6624f92ca112 (patch)
tree76a77c8a3eeb431c83035994b33ea30f9cddf403
parent53007a2b1724c15c170340658daac012f9d909be (diff)
remove legacy build-guards, now that webkit has rebaselined these.
SK_DISABLE_FAST_AA_STROKE_RECT SK_IGNORE_FAST_BLURRECT SK_DISABLE_EXTRACTSUBSET_OPAQUE_FIX SK_IGNORE_CF_OPTIMIZATION SK_IGNORE_NEW_STROKERECT SK_DISABLE_GPU_BLUR SK_IGNORE_ROTATED_FREETYPE_FIX The changes should all be: remove code for #ifdef remove guard for #ifndef Review URL: https://codereview.appspot.com/6858073 git-svn-id: http://skia.googlecode.com/svn/trunk@6546 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/core/SkBlitter.cpp6
-rw-r--r--src/core/SkBlitter_ARGB32.cpp7
-rw-r--r--src/core/SkCoreBlitters.h2
-rw-r--r--src/core/SkDraw.cpp6
-rw-r--r--src/core/SkMaskFilter.cpp9
-rw-r--r--src/core/SkPictureRecord.cpp7
-rw-r--r--src/core/SkStroke.cpp2
-rw-r--r--src/gpu/SkGpuDevice.cpp3
-rw-r--r--src/ports/SkFontHost_FreeType.cpp2
9 files changed, 2 insertions, 42 deletions
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index 418665d711..85331c23c3 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -871,7 +871,6 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device,
}
}
-#ifndef SK_IGNORE_FAST_SRCMODE
/*
* If the xfermode is CLEAR, then we can completely ignore the installed
* color/shader/colorfilter, and just pretend we're SRC + color==0. This
@@ -884,14 +883,9 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device,
mode = p->setXfermodeMode(SkXfermode::kSrc_Mode);
p->setColor(0);
}
-#endif
if (NULL == shader) {
-#ifdef SK_IGNORE_CF_OPTIMIZATION
- if (mode || cf) {
-#else
if (mode) {
-#endif
// xfermodes (and filters) require shaders for our current blitters
shader = SkNEW(SkColorShader);
paint.writable()->setShader(shader)->unref();
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index b8b7b0cf08..8b47481b3c 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -263,7 +263,6 @@ void SkARGB32_Black_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[],
///////////////////////////////////////////////////////////////////////////////
-#ifndef SK_IGNORE_FAST_SRCMODE
// Special version of SkBlitRow::Factory32 that knows we're in kSrc_Mode,
// instead of kSrcOver_Mode
static void blend_srcmode(SkPMColor* SK_RESTRICT device,
@@ -274,7 +273,6 @@ static void blend_srcmode(SkPMColor* SK_RESTRICT device,
device[i] = SkFourByteInterp256(span[i], device[i], aa256);
}
}
-#endif
SkARGB32_Shader_Blitter::SkARGB32_Shader_Blitter(const SkBitmap& device,
const SkPaint& paint) : INHERITED(device, paint) {
@@ -298,7 +296,6 @@ SkARGB32_Shader_Blitter::SkARGB32_Shader_Blitter(const SkBitmap& device,
fShadeDirectlyIntoDevice = true;
}
} else {
-#ifndef SK_IGNORE_FAST_SRCMODE
SkXfermode::Mode mode;
if (fXfermode->asMode(&mode)) {
if (SkXfermode::kSrc_Mode == mode) {
@@ -306,7 +303,6 @@ SkARGB32_Shader_Blitter::SkARGB32_Shader_Blitter(const SkBitmap& device,
fProc32Blend = blend_srcmode;
}
}
-#endif
}
fConstInY = SkToBool(fShader->getFlags() & SkShader::kConstInY32_Flag);
@@ -543,7 +539,6 @@ void SkARGB32_Shader_Blitter::blitMask(const SkMask& mask, const SkIRect& clip)
}
}
-#ifndef SK_IGNORE_FAST_SRCMODE
void SkARGB32_Shader_Blitter::blitV(int x, int y, int height, SkAlpha alpha) {
SkASSERT(x >= 0 && y >= 0 && y + height <= fDevice.height());
@@ -641,4 +636,4 @@ void SkARGB32_Shader_Blitter::blitV(int x, int y, int height, SkAlpha alpha) {
}
}
}
-#endif
+
diff --git a/src/core/SkCoreBlitters.h b/src/core/SkCoreBlitters.h
index 0a342e09a1..47a0aa4a57 100644
--- a/src/core/SkCoreBlitters.h
+++ b/src/core/SkCoreBlitters.h
@@ -130,9 +130,7 @@ public:
SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint);
virtual ~SkARGB32_Shader_Blitter();
virtual void blitH(int x, int y, int width) SK_OVERRIDE;
-#ifndef SK_IGNORE_FAST_SRCMODE
virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE;
-#endif
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE;
virtual void blitAntiH(int x, int y, const SkAlpha[], const int16_t[]) SK_OVERRIDE;
virtual void blitMask(const SkMask&, const SkIRect&) SK_OVERRIDE;
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 2af86c086a..3c1b72dde4 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -727,12 +727,6 @@ void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const {
SkPoint strokeSize;
RectType rtype = ComputeRectType(paint, *fMatrix, &strokeSize);
-#ifdef SK_DISABLE_FAST_AA_STROKE_RECT
- if (kStroke_RectType == rtype && paint.isAntiAlias()) {
- rtype = kPath_RectType;
- }
-#endif
-
if (kPath_RectType == rtype) {
SkPath tmp;
tmp.addRect(rect);
diff --git a/src/core/SkMaskFilter.cpp b/src/core/SkMaskFilter.cpp
index e02717824e..c4a7346b91 100644
--- a/src/core/SkMaskFilter.cpp
+++ b/src/core/SkMaskFilter.cpp
@@ -13,13 +13,6 @@
#include "SkDraw.h"
#include "SkRasterClip.h"
-#ifdef SK_IGNORE_FAST_BLURRECT
-#if (SK_IGNORE_FAST_BLURRECT != 0 && SK_IGNORE_FAST_BLURRECT != 1)
- #error "SK_IGNORE_FAST_BLURRECT must be 0 or 1 or undefined"
-#endif
-#else
- #define SK_IGNORE_FAST_BLURRECT 0
-#endif
SK_DEFINE_INST_COUNT(SkMaskFilter)
@@ -202,7 +195,7 @@ bool SkMaskFilter::filterPath(const SkPath& devPath, const SkMatrix& matrix,
SkBlitter* blitter, SkPaint::Style style) {
SkRect rects[2];
int rectCount = 0;
- if (!SK_IGNORE_FAST_BLURRECT && SkPaint::kFill_Style == style) {
+ if (SkPaint::kFill_Style == style) {
rectCount = countNestedRects(devPath, rects);
}
if (rectCount > 0) {
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 96467387b7..d6f51e357e 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -160,13 +160,6 @@ static inline uint32_t getSkipableSize(unsigned drawType) {
* the restore() call. If we still need the restore(), return false.
*/
static bool collapseSaveClipRestore(SkWriter32* writer, int32_t offset) {
- // Some unexplained crashes in Chrome may be caused by this. Disabling
- // for now to see if it helps.
- // crbug.com/147406
-#ifdef SK_DISABLE_PICTURE_PEEPHOLE_OPTIMIZATION
- return false;
-#endif
-
#ifdef TRACK_COLLAPSE_STATS
gCollapseCalls += 1;
#endif
diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp
index 9b20bd844f..e45a4d0f0a 100644
--- a/src/core/SkStroke.cpp
+++ b/src/core/SkStroke.cpp
@@ -608,7 +608,6 @@ void SkStroke::strokePath(const SkPath& src, SkPath* dst) const {
}
// If src is really a rect, call our specialty strokeRect() method
-#ifndef SK_IGNORE_NEW_STROKERECT
{
bool isClosed;
SkPath::Direction dir;
@@ -622,7 +621,6 @@ void SkStroke::strokePath(const SkPath& src, SkPath* dst) const {
return;
}
}
-#endif
#ifdef SK_SCALAR_IS_FIXED
void (*proc)(SkPoint pts[], int count) = identity_proc;
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 2d79991b3f..13fb99c905 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -772,9 +772,6 @@ inline bool shouldDrawBlurWithCPU(const SkRect& rect, SkScalar radius) {
bool drawWithGPUMaskFilter(GrContext* context, const SkPath& devPath,
SkMaskFilter* filter, const SkRegion& clip,
SkBounder* bounder, GrPaint* grp, GrPathFill pathFillType) {
-#ifdef SK_DISABLE_GPU_BLUR
- return false;
-#endif
SkMaskFilter::BlurInfo info;
SkMaskFilter::BlurType blurType = filter->asABlur(&info);
if (SkMaskFilter::kNone_BlurType == blurType) {
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 8a3c250691..71899f40a4 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -678,12 +678,10 @@ void SkFontHost::FilterRec(SkScalerContext::Rec* rec, SkTypeface*) {
}
}
-#ifndef SK_IGNORE_ROTATED_FREETYPE_FIX
// rotated text looks bad with hinting, so we disable it as needed
if (!isAxisAligned(*rec)) {
h = SkPaint::kNo_Hinting;
}
-#endif
rec->setHinting(h);
#ifndef SK_GAMMA_APPLY_TO_A8