OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
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 #ifndef SkPicturePlayback_DEFINED | 9 #ifndef SkPicturePlayback_DEFINED |
10 #define SkPicturePlayback_DEFINED | 10 #define SkPicturePlayback_DEFINED |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 public: | 340 public: |
341 // All the operations between fStart and fStop (inclusive) will be repla
ced with | 341 // All the operations between fStart and fStop (inclusive) will be repla
ced with |
342 // a single drawBitmap call using fPos, fBM and fPaint. | 342 // a single drawBitmap call using fPos, fBM and fPaint. |
343 // fPaint will be NULL if the picture's paint wasn't copyable | 343 // fPaint will be NULL if the picture's paint wasn't copyable |
344 struct ReplacementInfo { | 344 struct ReplacementInfo { |
345 size_t fStart; | 345 size_t fStart; |
346 size_t fStop; | 346 size_t fStop; |
347 SkIPoint fPos; | 347 SkIPoint fPos; |
348 SkBitmap* fBM; // fBM is allocated so ReplacementInfo can
remain POD | 348 SkBitmap* fBM; // fBM is allocated so ReplacementInfo can
remain POD |
349 const SkPaint* fPaint; // Note: this object doesn't own the paint | 349 const SkPaint* fPaint; // Note: this object doesn't own the paint |
350 | |
351 SkIRect fSrcRect; | |
352 }; | 350 }; |
353 | 351 |
354 ~PlaybackReplacements() { this->freeAll(); } | 352 ~PlaybackReplacements() { this->freeAll(); } |
355 | 353 |
356 // Add a new replacement range. The replacement ranges should be | 354 // Add a new replacement range. The replacement ranges should be |
357 // sorted in increasing order and non-overlapping (esp. no nested | 355 // sorted in increasing order and non-overlapping (esp. no nested |
358 // saveLayers). | 356 // saveLayers). |
359 ReplacementInfo* push(); | 357 ReplacementInfo* push(); |
360 | 358 |
361 private: | 359 private: |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 | 420 |
423 void initForPlayback() const; | 421 void initForPlayback() const; |
424 | 422 |
425 #ifdef SK_BUILD_FOR_ANDROID | 423 #ifdef SK_BUILD_FOR_ANDROID |
426 SkMutex fDrawMutex; | 424 SkMutex fDrawMutex; |
427 bool fAbortCurrentPlayback; | 425 bool fAbortCurrentPlayback; |
428 #endif | 426 #endif |
429 }; | 427 }; |
430 | 428 |
431 #endif | 429 #endif |
OLD | NEW |