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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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/SkBBHFactory.cpp ('k') | src/core/SkBitmap.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 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
58 58
59 const SkBigPicture::Analysis& SkBigPicture::analysis() const { 59 const SkBigPicture::Analysis& SkBigPicture::analysis() const {
60 auto create = [&]() { return SkNEW_ARGS(Analysis, (*fRecord)); }; 60 auto create = [&]() { return new Analysis(*fRecord); };
61 return *fAnalysis.get(create); 61 return *fAnalysis.get(create);
62 } 62 }
63 63
64 SkRect SkBigPicture::cullRect() const { return fCullRect; } 64 SkRect SkBigPicture::cullRect() const { return fCullRect; }
65 bool SkBigPicture::hasText() const { return this->analysis().fHasT ext; } 65 bool SkBigPicture::hasText() const { return this->analysis().fHasT ext; }
66 bool SkBigPicture::willPlayBackBitmaps() const { return this->analysis().fWill PlaybackBitmaps; } 66 bool SkBigPicture::willPlayBackBitmaps() const { return this->analysis().fWill PlaybackBitmaps; }
67 int SkBigPicture::numSlowPaths() const { return this->analysis().fNumSlowPath sAndDashEffects; } 67 int SkBigPicture::numSlowPaths() const { return this->analysis().fNumSlowPath sAndDashEffects; }
68 int SkBigPicture::approximateOpCount() const { return fRecord->count(); } 68 int SkBigPicture::approximateOpCount() const { return fRecord->count(); }
69 size_t SkBigPicture::approximateBytesUsed() const { 69 size_t SkBigPicture::approximateBytesUsed() const {
70 size_t bytes = sizeof(*this) + fRecord->bytesUsed() + fApproxBytesUsedBySubP ictures; 70 size_t bytes = sizeof(*this) + fRecord->bytesUsed() + fApproxBytesUsedBySubP ictures;
(...skipping 18 matching lines...) Expand all
89 for (int 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/SkBBHFactory.cpp ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698