Remove SHADER_AA_FILL_RECT flag
Review URL: https://codereview.chromium.org/1271243004
This commit is contained in:
parent
6c17ca5905
commit
d8aa59df63
@ -213,25 +213,11 @@ static bool apply_aa_to_rect(GrDrawTarget* target,
|
||||
SkScalar strokeWidth,
|
||||
const SkMatrix& combinedMatrix,
|
||||
GrColor color) {
|
||||
if (pipelineBuilder->getRenderTarget()->isUnifiedMultisampled()) {
|
||||
if (pipelineBuilder->getRenderTarget()->isUnifiedMultisampled() ||
|
||||
!combinedMatrix.preservesAxisAlignment()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef SHADER_AA_FILL_RECT
|
||||
if (strokeWidth >= 0) {
|
||||
#endif
|
||||
if (!combinedMatrix.preservesAxisAlignment()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef SHADER_AA_FILL_RECT
|
||||
} else {
|
||||
if (!combinedMatrix.preservesRightAngles()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
combinedMatrix.mapRect(devBoundRect, rect);
|
||||
if (!combinedMatrix.rectStaysRect()) {
|
||||
return true;
|
||||
|
@ -488,25 +488,14 @@ void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect,
|
||||
bool usePath = doStroke && width > 0 &&
|
||||
(paint.getStrokeJoin() == SkPaint::kRound_Join ||
|
||||
(paint.getStrokeJoin() == SkPaint::kBevel_Join && rect.isEmpty()));
|
||||
// another two reasons we might need to call drawPath...
|
||||
|
||||
if (paint.getMaskFilter()) {
|
||||
// a few other reasons we might need to call drawPath...
|
||||
if (paint.getMaskFilter() ||
|
||||
paint.getStyle() == SkPaint::kStrokeAndFill_Style) { // we can't both stroke and fill rects
|
||||
usePath = true;
|
||||
}
|
||||
|
||||
if (!usePath && paint.isAntiAlias() && !draw.fMatrix->rectStaysRect()) {
|
||||
#ifdef SHADER_AA_FILL_RECT
|
||||
if (doStroke) {
|
||||
#endif
|
||||
usePath = true;
|
||||
#ifdef SHADER_AA_FILL_RECT
|
||||
} else {
|
||||
usePath = !draw.fMatrix->preservesRightAngles();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// until we can both stroke and fill rectangles
|
||||
if (paint.getStyle() == SkPaint::kStrokeAndFill_Style) {
|
||||
usePath = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user