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

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

Issue 511613002: Convert BBH APIs to use SkRect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: another in BBH test Created 6 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/SkBBoxHierarchyRecord.cpp ('k') | src/core/SkPictureData.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 /* 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
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkBBoxHierarchyRecord.cpp ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698