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

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

Issue 429343004: Stopped skipping tests in dm of SkPatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Moved DRAW_PATCH DrawType to the last position Created 6 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 unified diff | Download patch
« no previous file with comments | « src/core/SkBBoxRecord.cpp ('k') | src/core/SkPatch.cpp » ('j') | 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 8
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 } 2251 }
2252 2252
2253 LOOPER_END 2253 LOOPER_END
2254 } 2254 }
2255 2255
2256 void SkCanvas::drawPatch(const SkPatch& patch, const SkPaint& paint) { 2256 void SkCanvas::drawPatch(const SkPatch& patch, const SkPaint& paint) {
2257 2257
2258 // Since a patch is always within the convex hull of the control points, we discard it when its 2258 // Since a patch is always within the convex hull of the control points, we discard it when its
2259 // bounding rectangle is completely outside the current clip. 2259 // bounding rectangle is completely outside the current clip.
2260 SkRect bounds; 2260 SkRect bounds;
2261 bounds.set(patch.getControlPoints(), 12); 2261 bounds.set(patch.getControlPoints(), SkPatch::kNumCtrlPts);
2262 if (this->quickReject(bounds)) { 2262 if (this->quickReject(bounds)) {
2263 return; 2263 return;
2264 } 2264 }
2265 2265
2266 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, NULL) 2266 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, NULL)
2267 2267
2268 while (iter.next()) { 2268 while (iter.next()) {
2269 iter.fDevice->drawPatch(iter, patch, paint); 2269 iter.fDevice->drawPatch(iter, patch, paint);
2270 } 2270 }
2271 2271
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2504 if (!supported_for_raster_canvas(info)) { 2504 if (!supported_for_raster_canvas(info)) {
2505 return NULL; 2505 return NULL;
2506 } 2506 }
2507 2507
2508 SkBitmap bitmap; 2508 SkBitmap bitmap;
2509 if (!bitmap.installPixels(info, pixels, rowBytes)) { 2509 if (!bitmap.installPixels(info, pixels, rowBytes)) {
2510 return NULL; 2510 return NULL;
2511 } 2511 }
2512 return SkNEW_ARGS(SkCanvas, (bitmap)); 2512 return SkNEW_ARGS(SkCanvas, (bitmap));
2513 } 2513 }
OLDNEW
« no previous file with comments | « src/core/SkBBoxRecord.cpp ('k') | src/core/SkPatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698