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

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

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkDeviceProfile.cpp ('k') | src/core/SkFlattenable.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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 "SkDrawLooper.h" 8 #include "SkDrawLooper.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkMatrix.h" 10 #include "SkMatrix.h"
11 #include "SkPaint.h" 11 #include "SkPaint.h"
12 #include "SkRect.h" 12 #include "SkRect.h"
13 13
14 SK_DEFINE_INST_COUNT(SkDrawLooper)
15
16 bool SkDrawLooper::canComputeFastBounds(const SkPaint& paint) { 14 bool SkDrawLooper::canComputeFastBounds(const SkPaint& paint) {
17 SkCanvas canvas; 15 SkCanvas canvas;
18 16
19 this->init(&canvas); 17 this->init(&canvas);
20 for (;;) { 18 for (;;) {
21 SkPaint p(paint); 19 SkPaint p(paint);
22 if (this->next(&canvas, &p)) { 20 if (this->next(&canvas, &p)) {
23 p.setLooper(NULL); 21 p.setLooper(NULL);
24 if (!p.canComputeFastBounds()) { 22 if (!p.canComputeFastBounds()) {
25 return false; 23 return false;
(...skipping 23 matching lines...) Expand all
49 if (firstTime) { 47 if (firstTime) {
50 *dst = r; 48 *dst = r;
51 } else { 49 } else {
52 dst->join(r); 50 dst->join(r);
53 } 51 }
54 } else { 52 } else {
55 break; 53 break;
56 } 54 }
57 } 55 }
58 } 56 }
OLDNEW
« no previous file with comments | « src/core/SkDeviceProfile.cpp ('k') | src/core/SkFlattenable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698