Chromium Code Reviews| 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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 965 exists, its refcnt is decrement. If the new filter is not null, its | 965 exists, its refcnt is decrement. If the new filter is not null, its |
| 966 refcnt is incremented. The filter is saved/restored, just like the | 966 refcnt is incremented. The filter is saved/restored, just like the |
| 967 matrix and clip. | 967 matrix and clip. |
| 968 @param filter the new filter (or NULL) | 968 @param filter the new filter (or NULL) |
| 969 @return the new filter | 969 @return the new filter |
| 970 */ | 970 */ |
| 971 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter); | 971 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter); |
| 972 | 972 |
| 973 ////////////////////////////////////////////////////////////////////////// | 973 ////////////////////////////////////////////////////////////////////////// |
| 974 | 974 |
| 975 /** | |
| 976 * Return true if the current clip is empty (i.e. nothing will draw). | |
| 977 * Note: this is not always a free call, so it should not be used | |
| 978 * more often than necessary. However, once the canvas has computed this | |
| 979 * result, subsequent calls will be cheap (until the clip state changes, | |
|
robertphillips
2014/02/24 19:33:13
restore?
reed1
2014/02/24 19:36:18
Done.
| |
| 980 * which can happen on any clip..() call or rester(). | |
| 981 */ | |
| 982 bool isClipEmpty() const; | |
| 983 | |
| 975 /** Return the current matrix on the canvas. | 984 /** Return the current matrix on the canvas. |
| 976 This does not account for the translate in any of the devices. | 985 This does not account for the translate in any of the devices. |
| 977 @return The current matrix on the canvas. | 986 @return The current matrix on the canvas. |
| 978 */ | 987 */ |
| 979 const SkMatrix& getTotalMatrix() const; | 988 const SkMatrix& getTotalMatrix() const; |
| 980 | 989 |
| 981 enum ClipType { | 990 enum ClipType { |
| 982 kEmpty_ClipType = 0, | 991 kEmpty_ClipType = 0, |
| 983 kRect_ClipType, | 992 kRect_ClipType, |
| 984 kComplex_ClipType | 993 kComplex_ClipType |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1291 bool asROBitmap(SkBitmap*) const; | 1300 bool asROBitmap(SkBitmap*) const; |
| 1292 | 1301 |
| 1293 private: | 1302 private: |
| 1294 SkBitmap fBitmap; // used if peekPixels() fails | 1303 SkBitmap fBitmap; // used if peekPixels() fails |
| 1295 const void* fAddr; // NULL on failure | 1304 const void* fAddr; // NULL on failure |
| 1296 SkImageInfo fInfo; | 1305 SkImageInfo fInfo; |
| 1297 size_t fRowBytes; | 1306 size_t fRowBytes; |
| 1298 }; | 1307 }; |
| 1299 | 1308 |
| 1300 #endif | 1309 #endif |
| OLD | NEW |