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
This commit is contained in:
parent
53007a2b17
commit
5f0add3ad6
@ -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();
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user