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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1299703003: Stop ping ponging AA in SkGpuDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 7052d2531cff56b9212f964efb6b82df33900301..083bbe3348545af11b3d5b0bfae7c4e7f2528949 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1037,28 +1037,6 @@ void SkGpuDevice::drawBitmapCommon(const SkDraw& draw,
bitmap.width() > maxTextureSize ||
bitmap.height() > maxTextureSize;
- // we check whether dst rect are pixel aligned
- if (!directDraw) {
- bool staysRect = draw.fMatrix->rectStaysRect();
-
- if (staysRect) {
- SkRect rect;
- SkRect dstRect = SkRect::MakeXYWH(0, 0, dstSize.fWidth, dstSize.fHeight);
- draw.fMatrix->mapRect(&rect, dstRect);
- const SkScalar *scalars = rect.asScalars();
- bool isDstPixelAligned = true;
- for (int i = 0; i < 4; i++) {
- if (!SkScalarIsInt(scalars[i])) {
- isDstPixelAligned = false;
- break;
- }
- }
-
- if (isDstPixelAligned)
- directDraw = true;
- }
- }
-
if (paint.getMaskFilter() || !directDraw) {
// Convert the bitmap to a shader so that the rect can be drawn
// through drawRect, which supports mask filters.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698