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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 SkASSERT(index < fOps.count()); | 328 SkASSERT(index < fOps.count()); |
329 return ((SkPictureStateTree::Draw*)fOps[index])->fOffset; | 329 return ((SkPictureStateTree::Draw*)fOps[index])->fOffset; |
330 } | 330 } |
331 | 331 |
332 const SkMatrix& SkPicture::OperationList::matrix(int index) const { | 332 const SkMatrix& SkPicture::OperationList::matrix(int index) const { |
333 SkASSERT(index < fOps.count()); | 333 SkASSERT(index < fOps.count()); |
334 return *((SkPictureStateTree::Draw*)fOps[index])->fMatrix; | 334 return *((SkPictureStateTree::Draw*)fOps[index])->fMatrix; |
335 } | 335 } |
336 | 336 |
337 // fRecord TODO(robert) / kind of OK in a non-optimal sense | 337 // fRecord TODO(robert) / kind of OK in a non-optimal sense |
338 const SkPicture::OperationList* SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe
ct& queryRect) const { | 338 const SkPicture::OperationList* SkPicture::EXPERIMENTAL_getActiveOps(const SkRec
t& queryRect) const { |
339 SkASSERT(NULL != fData.get()); | 339 SkASSERT(NULL != fData.get()); |
340 if (NULL != fData.get()) { | 340 if (NULL != fData.get()) { |
341 return fData->getActiveOps(queryRect); | 341 return fData->getActiveOps(queryRect); |
342 } | 342 } |
343 return NULL; | 343 return NULL; |
344 } | 344 } |
345 | 345 |
346 // fRecord OK | 346 // fRecord OK |
347 void SkPicture::draw(SkCanvas* canvas, SkDrawPictureCallback* callback) const { | 347 void SkPicture::draw(SkCanvas* canvas, SkDrawPictureCallback* callback) const { |
348 SkASSERT(NULL != canvas); | 348 SkASSERT(NULL != canvas); |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 int SkPicture::approximateOpCount() const { | 640 int SkPicture::approximateOpCount() const { |
641 SkASSERT(fRecord.get() || fData.get()); | 641 SkASSERT(fRecord.get() || fData.get()); |
642 if (fRecord.get()) { | 642 if (fRecord.get()) { |
643 return fRecord->count(); | 643 return fRecord->count(); |
644 } | 644 } |
645 if (fData.get()) { | 645 if (fData.get()) { |
646 return fData->opCount(); | 646 return fData->opCount(); |
647 } | 647 } |
648 return 0; | 648 return 0; |
649 } | 649 } |
OLD | NEW |