| OLD | NEW |
| 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 | 7 |
| 8 #ifndef SkPictureRecord_DEFINED | 8 #ifndef SkPictureRecord_DEFINED |
| 9 #define SkPictureRecord_DEFINED | 9 #define SkPictureRecord_DEFINED |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // a 3 byte value into/out of a uint32_t | 26 // a 3 byte value into/out of a uint32_t |
| 27 #define MASK_24 0x00FFFFFF | 27 #define MASK_24 0x00FFFFFF |
| 28 #define UNPACK_8_24(combined, small, large) \ | 28 #define UNPACK_8_24(combined, small, large) \ |
| 29 small = (combined >> 24) & 0xFF; \ | 29 small = (combined >> 24) & 0xFF; \ |
| 30 large = combined & MASK_24; | 30 large = combined & MASK_24; |
| 31 #define PACK_8_24(small, large) ((small << 24) | large) | 31 #define PACK_8_24(small, large) ((small << 24) | large) |
| 32 | 32 |
| 33 | 33 |
| 34 class SkPictureRecord : public SkCanvas { | 34 class SkPictureRecord : public SkCanvas { |
| 35 public: | 35 public: |
| 36 SkPictureRecord(uint32_t recordFlags, SkBaseDevice*); | 36 SkPictureRecord(const SkISize& dimensions, uint32_t recordFlags); |
| 37 virtual ~SkPictureRecord(); | 37 virtual ~SkPictureRecord(); |
| 38 | 38 |
| 39 virtual SkBaseDevice* setDevice(SkBaseDevice* device) SK_OVERRIDE; | 39 virtual SkBaseDevice* setDevice(SkBaseDevice* device) SK_OVERRIDE; |
| 40 | 40 |
| 41 virtual int save(SaveFlags) SK_OVERRIDE; | 41 virtual int save(SaveFlags) SK_OVERRIDE; |
| 42 virtual int saveLayer(const SkRect* bounds, const SkPaint*, SaveFlags) SK_OV
ERRIDE; | 42 virtual int saveLayer(const SkRect* bounds, const SkPaint*, SaveFlags) SK_OV
ERRIDE; |
| 43 virtual void restore() SK_OVERRIDE; | 43 virtual void restore() SK_OVERRIDE; |
| 44 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; | 44 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; |
| 45 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; | 45 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; |
| 46 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; | 46 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 friend class SkPictureTester; // for unit testing | 289 friend class SkPictureTester; // for unit testing |
| 290 | 290 |
| 291 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE | 291 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE |
| 292 SkMatrixClipStateMgr fMCMgr; | 292 SkMatrixClipStateMgr fMCMgr; |
| 293 #endif | 293 #endif |
| 294 | 294 |
| 295 typedef SkCanvas INHERITED; | 295 typedef SkCanvas INHERITED; |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 #endif | 298 #endif |
| OLD | NEW |