| OLD | NEW |
| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 if (NULL != fRecord) { | 246 if (NULL != fRecord) { |
| 247 fRecord->endRecording(); | 247 fRecord->endRecording(); |
| 248 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); | 248 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); |
| 249 fRecord->unref(); | 249 fRecord->unref(); |
| 250 fRecord = NULL; | 250 fRecord = NULL; |
| 251 } | 251 } |
| 252 } | 252 } |
| 253 SkASSERT(NULL == fRecord); | 253 SkASSERT(NULL == fRecord); |
| 254 } | 254 } |
| 255 | 255 |
| 256 void SkPicture::draw(SkCanvas* surface) { | 256 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { |
| 257 this->endRecording(); | 257 this->endRecording(); |
| 258 if (fPlayback) { | 258 if (fPlayback) { |
| 259 fPlayback->draw(*surface); | 259 fPlayback->draw(*surface, callback); |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 | 262 |
| 263 /////////////////////////////////////////////////////////////////////////////// | 263 /////////////////////////////////////////////////////////////////////////////// |
| 264 | 264 |
| 265 #include "SkStream.h" | 265 #include "SkStream.h" |
| 266 | 266 |
| 267 SkPicture::SkPicture(SkStream* stream) { | 267 SkPicture::SkPicture(SkStream* stream) { |
| 268 this->initFromStream(stream, NULL, NULL); | 268 this->initFromStream(stream, NULL, NULL); |
| 269 } | 269 } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 } | 335 } |
| 336 | 336 |
| 337 #ifdef SK_BUILD_FOR_ANDROID | 337 #ifdef SK_BUILD_FOR_ANDROID |
| 338 void SkPicture::abortPlayback() { | 338 void SkPicture::abortPlayback() { |
| 339 if (NULL == fPlayback) { | 339 if (NULL == fPlayback) { |
| 340 return; | 340 return; |
| 341 } | 341 } |
| 342 fPlayback->abort(); | 342 fPlayback->abort(); |
| 343 } | 343 } |
| 344 #endif | 344 #endif |
| OLD | NEW |