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

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

Issue 183683010: fix the error that path is inversed for stroke and strokeAndFill styles (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix the error when path inversed for StrokeAndFill style Created 6 years, 8 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 | « no previous file | src/core/SkDraw.cpp » ('j') | src/gpu/GrContext.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after
2079 if (!path.isInverseFillType() && paint.canComputeFastBounds()) { 2079 if (!path.isInverseFillType() && paint.canComputeFastBounds()) {
2080 const SkRect& pathBounds = path.getBounds(); 2080 const SkRect& pathBounds = path.getBounds();
2081 bounds = &paint.computeFastBounds(pathBounds, &storage); 2081 bounds = &paint.computeFastBounds(pathBounds, &storage);
2082 if (this->quickReject(*bounds)) { 2082 if (this->quickReject(*bounds)) {
2083 return; 2083 return;
2084 } 2084 }
2085 } 2085 }
2086 2086
2087 const SkRect& r = path.getBounds(); 2087 const SkRect& r = path.getBounds();
2088 if (r.width() <= 0 && r.height() <= 0) { 2088 if (r.width() <= 0 && r.height() <= 0) {
2089 if (path.isInverseFillType()) { 2089 if (path.isInverseFillType() && SkPaint::kFill_Style == paint.getStyle() ) {
2090 this->internalDrawPaint(paint); 2090 this->internalDrawPaint(paint);
2091 } 2091 }
2092 return; 2092 return;
2093 } 2093 }
2094 2094
2095 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) 2095 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds)
2096 2096
2097 while (iter.next()) { 2097 while (iter.next()) {
2098 iter.fDevice->drawPath(iter, path, looper.paint()); 2098 iter.fDevice->drawPath(iter, path, looper.paint());
2099 } 2099 }
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
2659 if (!bitmap.installPixels(info, pixels, rowBytes)) { 2659 if (!bitmap.installPixels(info, pixels, rowBytes)) {
2660 return NULL; 2660 return NULL;
2661 } 2661 }
2662 2662
2663 // should this functionality be moved into allocPixels()? 2663 // should this functionality be moved into allocPixels()?
2664 if (!bitmap.info().isOpaque()) { 2664 if (!bitmap.info().isOpaque()) {
2665 bitmap.eraseColor(0); 2665 bitmap.eraseColor(0);
2666 } 2666 }
2667 return SkNEW_ARGS(SkCanvas, (bitmap)); 2667 return SkNEW_ARGS(SkCanvas, (bitmap));
2668 } 2668 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkDraw.cpp » ('j') | src/gpu/GrContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698