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

Side by Side Diff: src/core/SkCanvas.cpp

Issue 619363002: Don't turn on dither for saveLayers which have no paint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add GM suppressions Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 iter.fDevice->drawBitmap(iter, bitmap, matrix, looper.paint()); 1197 iter.fDevice->drawBitmap(iter, bitmap, matrix, looper.paint());
1198 } 1198 }
1199 1199
1200 LOOPER_END 1200 LOOPER_END
1201 } 1201 }
1202 1202
1203 void SkCanvas::internalDrawDevice(SkBaseDevice* srcDev, int x, int y, 1203 void SkCanvas::internalDrawDevice(SkBaseDevice* srcDev, int x, int y,
1204 const SkPaint* paint) { 1204 const SkPaint* paint) {
1205 SkPaint tmp; 1205 SkPaint tmp;
1206 if (NULL == paint) { 1206 if (NULL == paint) {
1207 tmp.setDither(true);
1208 paint = &tmp; 1207 paint = &tmp;
1209 } 1208 }
1210 1209
1211 LOOPER_BEGIN_DRAWDEVICE(*paint, SkDrawFilter::kBitmap_Type) 1210 LOOPER_BEGIN_DRAWDEVICE(*paint, SkDrawFilter::kBitmap_Type)
1212 while (iter.next()) { 1211 while (iter.next()) {
1213 SkBaseDevice* dstDev = iter.fDevice; 1212 SkBaseDevice* dstDev = iter.fDevice;
1214 paint = &looper.paint(); 1213 paint = &looper.paint();
1215 SkImageFilter* filter = paint->getImageFilter(); 1214 SkImageFilter* filter = paint->getImageFilter();
1216 SkIPoint pos = { x - iter.getX(), y - iter.getY() }; 1215 SkIPoint pos = { x - iter.getX(), y - iter.getY() };
1217 if (filter && !dstDev->canHandleImageFilter(filter)) { 1216 if (filter && !dstDev->canHandleImageFilter(filter)) {
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 } 2552 }
2554 2553
2555 if (matrix) { 2554 if (matrix) {
2556 canvas->concat(*matrix); 2555 canvas->concat(*matrix);
2557 } 2556 }
2558 } 2557 }
2559 2558
2560 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2559 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2561 fCanvas->restoreToCount(fSaveCount); 2560 fCanvas->restoreToCount(fSaveCount);
2562 } 2561 }
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698