OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 SkCanvas_DEFINED | 8 #ifndef SkCanvas_DEFINED |
9 #define SkCanvas_DEFINED | 9 #define SkCanvas_DEFINED |
10 | 10 |
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 // the caller must respect the restrictions associated with peekPixels(). | 1500 // the caller must respect the restrictions associated with peekPixels(). |
1501 bool asROBitmap(SkBitmap*) const; | 1501 bool asROBitmap(SkBitmap*) const; |
1502 | 1502 |
1503 private: | 1503 private: |
1504 SkBitmap fBitmap; // used if peekPixels() fails | 1504 SkBitmap fBitmap; // used if peekPixels() fails |
1505 const void* fAddr; // NULL on failure | 1505 const void* fAddr; // NULL on failure |
1506 SkImageInfo fInfo; | 1506 SkImageInfo fInfo; |
1507 size_t fRowBytes; | 1507 size_t fRowBytes; |
1508 }; | 1508 }; |
1509 | 1509 |
| 1510 static inline SkCanvas::SaveFlags operator|(const SkCanvas::SaveFlags lhs, |
| 1511 const SkCanvas::SaveFlags rhs) { |
| 1512 return static_cast<SkCanvas::SaveFlags>(lhs | rhs); |
| 1513 } |
| 1514 |
| 1515 static inline SkCanvas::SaveFlags& operator|=(SkCanvas::SaveFlags& lhs, |
| 1516 const SkCanvas::SaveFlags rhs) { |
| 1517 lhs = lhs | rhs; |
| 1518 return lhs; |
| 1519 } |
| 1520 |
| 1521 |
1510 #endif | 1522 #endif |
OLD | NEW |