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

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

Issue 1300163002: unsigned -> int for counts and indices in picture-related code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) 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 unified diff | Download patch
« no previous file with comments | « src/core/SkBigPicture.h ('k') | src/core/SkLayerInfo.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "SkBBoxHierarchy.h" 8 #include "SkBBoxHierarchy.h"
9 #include "SkBigPicture.h" 9 #include "SkBigPicture.h"
10 #include "SkPictureCommon.h" 10 #include "SkPictureCommon.h"
(...skipping 25 matching lines...) Expand all
36 SkRecordDraw(*fRecord, 36 SkRecordDraw(*fRecord,
37 canvas, 37 canvas,
38 this->drawablePicts(), 38 this->drawablePicts(),
39 nullptr, 39 nullptr,
40 this->drawableCount(), 40 this->drawableCount(),
41 useBBH ? fBBH.get() : nullptr, 41 useBBH ? fBBH.get() : nullptr,
42 callback); 42 callback);
43 } 43 }
44 44
45 void SkBigPicture::partialPlayback(SkCanvas* canvas, 45 void SkBigPicture::partialPlayback(SkCanvas* canvas,
46 unsigned start, 46 int start,
47 unsigned stop, 47 int stop,
48 const SkMatrix& initialCTM) const { 48 const SkMatrix& initialCTM) const {
49 SkASSERT(canvas); 49 SkASSERT(canvas);
50 SkRecordPartialDraw(*fRecord, 50 SkRecordPartialDraw(*fRecord,
51 canvas, 51 canvas,
52 this->drawablePicts(), 52 this->drawablePicts(),
53 this->drawableCount(), 53 this->drawableCount(),
54 start, 54 start,
55 stop, 55 stop,
56 initialCTM); 56 initialCTM);
57 } 57 }
(...skipping 21 matching lines...) Expand all
79 SkPicture const* const* SkBigPicture::drawablePicts() const { 79 SkPicture const* const* SkBigPicture::drawablePicts() const {
80 return fDrawablePicts ? fDrawablePicts->begin() : nullptr; 80 return fDrawablePicts ? fDrawablePicts->begin() : nullptr;
81 } 81 }
82 82
83 SkBigPicture::Analysis::Analysis(const SkRecord& record) { 83 SkBigPicture::Analysis::Analysis(const SkRecord& record) {
84 SkTextHunter text; 84 SkTextHunter text;
85 SkBitmapHunter bitmap; 85 SkBitmapHunter bitmap;
86 SkPathCounter path; 86 SkPathCounter path;
87 87
88 bool hasText = false, hasBitmap = false; 88 bool hasText = false, hasBitmap = false;
89 for (unsigned i = 0; i < record.count(); i++) { 89 for (int i = 0; i < record.count(); i++) {
90 hasText = hasText || record.visit<bool>(i, text); 90 hasText = hasText || record.visit<bool>(i, text);
91 hasBitmap = hasBitmap || record.visit<bool>(i, bitmap); 91 hasBitmap = hasBitmap || record.visit<bool>(i, bitmap);
92 record.visit<void>(i, path); 92 record.visit<void>(i, path);
93 } 93 }
94 94
95 fHasText = hasText; 95 fHasText = hasText;
96 fWillPlaybackBitmaps = hasBitmap; 96 fWillPlaybackBitmaps = hasBitmap;
97 fNumSlowPathsAndDashEffects = SkTMin<int>(path.fNumSlowPathsAndDashEffects, 255); 97 fNumSlowPathsAndDashEffects = SkTMin<int>(path.fNumSlowPathsAndDashEffects, 255);
98 } 98 }
OLDNEW
« no previous file with comments | « src/core/SkBigPicture.h ('k') | src/core/SkLayerInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698