| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #include <new> | 7 #include <new> |
| 8 #include "SkBBoxHierarchy.h" | 8 #include "SkBBoxHierarchy.h" |
| 9 #include "SkDrawPictureCallback.h" | 9 #include "SkDrawPictureCallback.h" |
| 10 #include "SkPictureData.h" | 10 #include "SkPictureData.h" |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 if (!this->parseBufferTag(buffer, tag, size)) { | 628 if (!this->parseBufferTag(buffer, tag, size)) { |
| 629 return false; // we're invalid | 629 return false; // we're invalid |
| 630 } | 630 } |
| 631 } | 631 } |
| 632 return true; | 632 return true; |
| 633 } | 633 } |
| 634 | 634 |
| 635 /////////////////////////////////////////////////////////////////////////////// | 635 /////////////////////////////////////////////////////////////////////////////// |
| 636 /////////////////////////////////////////////////////////////////////////////// | 636 /////////////////////////////////////////////////////////////////////////////// |
| 637 | 637 |
| 638 const SkPicture::OperationList* SkPictureData::getActiveOps(const SkIRect& query
) const { | 638 const SkPicture::OperationList* SkPictureData::getActiveOps(const SkRect& query)
const { |
| 639 if (NULL == fStateTree || NULL == fBoundingHierarchy) { | 639 if (NULL == fStateTree || NULL == fBoundingHierarchy) { |
| 640 return NULL; | 640 return NULL; |
| 641 } | 641 } |
| 642 | 642 |
| 643 SkPicture::OperationList* activeOps = SkNEW(SkPicture::OperationList); | 643 SkPicture::OperationList* activeOps = SkNEW(SkPicture::OperationList); |
| 644 fBoundingHierarchy->search(query, &(activeOps->fOps)); | 644 fBoundingHierarchy->search(query, &(activeOps->fOps)); |
| 645 return activeOps; | 645 return activeOps; |
| 646 } | 646 } |
| 647 | 647 |
| 648 #if SK_SUPPORT_GPU | 648 #if SK_SUPPORT_GPU |
| (...skipping 13 matching lines...) Expand all Loading... |
| 662 } | 662 } |
| 663 } | 663 } |
| 664 | 664 |
| 665 bool SkPictureData::suitableForLayerOptimization() const { | 665 bool SkPictureData::suitableForLayerOptimization() const { |
| 666 return fContentInfo.numLayers() > 0; | 666 return fContentInfo.numLayers() > 0; |
| 667 } | 667 } |
| 668 #endif | 668 #endif |
| 669 /////////////////////////////////////////////////////////////////////////////// | 669 /////////////////////////////////////////////////////////////////////////////// |
| 670 | 670 |
| 671 | 671 |
| OLD | NEW |