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

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

Issue 452673003: Revert of Add layer counting to SkPictureRecord (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/SkPictureData.h ('k') | src/core/SkPictureRecord.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 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 GrPixelConfig config, SkScalar d pi) const { 677 GrPixelConfig config, SkScalar d pi) const {
678 678
679 if (context != NULL) { 679 if (context != NULL) {
680 return this->suitableForGpuRasterization(context, reason, 680 return this->suitableForGpuRasterization(context, reason,
681 context->getRecommendedSampleCo unt(config, dpi)); 681 context->getRecommendedSampleCo unt(config, dpi));
682 } else { 682 } else {
683 return this->suitableForGpuRasterization(NULL, reason); 683 return this->suitableForGpuRasterization(NULL, reason);
684 } 684 }
685 } 685 }
686 686
687 bool SkPictureData::suitableForLayerOptimization() const {
688 return fContentInfo.numLayers() > 0;
689 }
690 #endif 687 #endif
691 /////////////////////////////////////////////////////////////////////////////// 688 ///////////////////////////////////////////////////////////////////////////////
692 689
693 #ifdef SK_DEBUG_SIZE 690 #ifdef SK_DEBUG_SIZE
694 int SkPictureData::size(size_t* sizePtr) { 691 int SkPictureData::size(size_t* sizePtr) {
695 int objects = bitmaps(sizePtr); 692 int objects = bitmaps(sizePtr);
696 objects += paints(sizePtr); 693 objects += paints(sizePtr);
697 objects += paths(sizePtr); 694 objects += paths(sizePtr);
698 objects += pictures(sizePtr); 695 objects += pictures(sizePtr);
699 objects += regions(sizePtr); 696 objects += regions(sizePtr);
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 for (index = 0; index < fPictureCount; index++) 1188 for (index = 0; index < fPictureCount; index++)
1192 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1189 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1193 "picture%p, ", fPictureRefs[index]); 1190 "picture%p, ", fPictureRefs[index]);
1194 if (fPictureCount > 0) 1191 if (fPictureCount > 0)
1195 SkDebugf("%s0};\n", pBuffer); 1192 SkDebugf("%s0};\n", pBuffer);
1196 1193
1197 const_cast<SkPictureData*>(this)->dumpStream(); 1194 const_cast<SkPictureData*>(this)->dumpStream();
1198 } 1195 }
1199 1196
1200 #endif 1197 #endif
OLDNEW
« no previous file with comments | « src/core/SkPictureData.h ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698