diff options
author | 2014-11-17 08:16:15 -0800 | |
---|---|---|
committer | 2014-11-17 08:16:15 -0800 | |
commit | 8910879098694c61267e21789d933928c1b7995e (patch) | |
tree | f42db9b120f64b2845c1712eaa6e5d39144505d1 /src | |
parent | 912b3d24a0e214e46a211da40cc01fe30238386c (diff) |
Make BBH parameter to SkRecordComputeLayers and SkRecordFillBounds optional
Chromium creates a picture to contain their picture pile in order to use MultiPictureDraw. They currently do not create a bounding box for that picture but I still need layer information for it. This change allows Chromium to continue without a BBH but still have layer information.
In the future, the brute force BBH might be suitable for their use case.
Please see gpu_raster_worker_pool.cc in (Add flag to beginRecording to request saveLayer information - https://codereview.chromium.org/721883002/) for where this is happening in Chromium.
Review URL: https://codereview.chromium.org/733963004
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkRecordDraw.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp index e35e5a0a9d..77235fda41 100644 --- a/src/core/SkRecordDraw.cpp +++ b/src/core/SkRecordDraw.cpp @@ -168,8 +168,9 @@ public: } // Finally feed all stored bounds into the BBH. They'll be returned in this order. - SkASSERT(bbh); - bbh->insert(&fBounds, fNumRecords); + if (bbh) { + bbh->insert(&fBounds, fNumRecords); + } } template <typename T> void operator()(const T& op) { |