OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 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 "SkPictureFlat.h" | 10 #include "SkPictureFlat.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 >= kNumAAConcavePathsTol) | 245 >= kNumAAConcavePathsTol) |
246 *reason = "Too many anti-aliased concave paths."; | 246 *reason = "Too many anti-aliased concave paths."; |
247 else | 247 else |
248 *reason = "Unknown reason for GPU unsuitability."; | 248 *reason = "Unknown reason for GPU unsuitability."; |
249 } | 249 } |
250 return ret; | 250 return ret; |
251 } | 251 } |
252 | 252 |
253 /////////////////////////////////////////////////////////////////////////////// | 253 /////////////////////////////////////////////////////////////////////////////// |
254 | 254 |
255 #ifdef SK_SUPPORT_LEGACY_DEFAULT_PICTURE_CTOR | |
256 // fRecord OK | |
257 SkPicture::SkPicture() | |
258 : fWidth(0) | |
259 , fHeight(0) { | |
260 this->needsNewGenID(); | |
261 } | |
262 #endif | |
263 | |
264 // fRecord OK | 255 // fRecord OK |
265 SkPicture::SkPicture(SkScalar width, SkScalar height, | 256 SkPicture::SkPicture(SkScalar width, SkScalar height, |
266 const SkPictureRecord& record, | 257 const SkPictureRecord& record, |
267 bool deepCopyOps) | 258 bool deepCopyOps) |
268 : fCullWidth(width) | 259 : fCullWidth(width) |
269 , fCullHeight(height) | 260 , fCullHeight(height) |
270 , fAnalysis() { | 261 , fAnalysis() { |
271 this->needsNewGenID(); | 262 this->needsNewGenID(); |
272 | 263 |
273 SkPictInfo info; | 264 SkPictInfo info; |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 int SkPicture::approximateOpCount() const { | 683 int SkPicture::approximateOpCount() const { |
693 SkASSERT(fRecord.get() || fData.get()); | 684 SkASSERT(fRecord.get() || fData.get()); |
694 if (fRecord.get()) { | 685 if (fRecord.get()) { |
695 return fRecord->count(); | 686 return fRecord->count(); |
696 } | 687 } |
697 if (fData.get()) { | 688 if (fData.get()) { |
698 return fData->opCount(); | 689 return fData->opCount(); |
699 } | 690 } |
700 return 0; | 691 return 0; |
701 } | 692 } |
OLD | NEW |