|
|
|
Created:
12 years, 11 months ago by junov1 Modified:
12 years, 11 months ago CC:
skia-review_googlegroups.com Base URL:
http://skia.googlecode.com/svn/ Visibility:
Public. |
Dusting off the code in #ifdef SK_DEBUG_SIZE
This CL makes the SK_DEBUG_SIZE code usable again and adds support for
bounding hierarchies to it. Also adding methods to query memory used by
bounding box structures.
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #
Total comments: 7
Total messages: 3
|
junov1
PTAL
|
12 years, 11 months ago (2013年02月14日 20:17:25 UTC) #1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PTAL
Can we bracket the new virtuals with SK_DEBUG_SIZE (or whatever the right name for that flag should be), so we don't accidentally create some dependency on those in our release code? Adding Cary to help w/ the review, as the original author of size-dummping.
https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkPicturePlay... File trunk/src/core/SkPicturePlayback.cpp (right): https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkPicturePlay... trunk/src/core/SkPicturePlayback.cpp:33: size_t overallBytes, bitmapBytes, matricesBytes, replace size_t with SkLONGLONG to remove casts below (adjusting all debug size functions accordingly) https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkPicturePlay... trunk/src/core/SkPicturePlayback.cpp:45: SkDebugf("bitmaps size %lld (bitmaps:%d) ", (SkLONGLONG)bitmapBytes, bitmaps); would be more clear to replace 'bitmaps size' with 'bitmap bytes', etc. https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkPicturePlay... trunk/src/core/SkPicturePlayback.cpp:53: SkDebugf("boundingHierarchy %lld (nodes:%d) ", (SkLONGLONG)boundingHierarchyBytes, boundingBoxes); nodes, boundingBoxes : pick one https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkPicturePlay... trunk/src/core/SkPicturePlayback.cpp:1008: SkOrderedWriteBuffer buffer(256, storage, sizeof(storage)); what about overallocating storage and then asserting if written storage exceeds sizeof(intptr_t) * 256? https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkPicturePlay... trunk/src/core/SkPicturePlayback.cpp:1025: // Approximation is this comment a FIXME? a note? a problem? it would be great to know more of what you're documenting here https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkPictureReco... File trunk/src/core/SkPictureRecord.cpp (right): https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkPictureReco... trunk/src/core/SkPictureRecord.cpp:852: result += sizeof(*fBitmapHeap) + fBitmapHeap->bytesAllocated(); result = ... https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkTileGrid.cpp File trunk/src/core/SkTileGrid.cpp (right): https://codereview.appspot.com/7327047/diff/5001/trunk/src/core/SkTileGrid.cp... trunk/src/core/SkTileGrid.cpp:29: size_t totalBytes = sizeof(*this) + sizeof(SkTDArray<void *>) * fTileCount; this looks suspicious. I don't see how this can know how much space the SkTDArray uses.