| 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 SkWindow_DEFINED | 8 #ifndef SkWindow_DEFINED |
| 9 #define SkWindow_DEFINED | 9 #define SkWindow_DEFINED |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; } | 45 SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; } |
| 46 void setSurfaceProps(const SkSurfaceProps& props) { | 46 void setSurfaceProps(const SkSurfaceProps& props) { |
| 47 fSurfaceProps = props; | 47 fSurfaceProps = props; |
| 48 } | 48 } |
| 49 | 49 |
| 50 SkImageInfo info() const { return fBitmap.info(); } | 50 SkImageInfo info() const { return fBitmap.info(); } |
| 51 const SkBitmap& getBitmap() const { return fBitmap; } | 51 const SkBitmap& getBitmap() const { return fBitmap; } |
| 52 | 52 |
| 53 void resize(int width, int height); | 53 void resize(int width, int height); |
| 54 void resize(const SkImageInfo&); | 54 void resize(const SkImageInfo&); |
| 55 void setColorType(SkColorType, sk_sp<SkColorSpace>); | 55 void setColorType(SkColorType, SkColorProfileType); |
| 56 | 56 |
| 57 bool isDirty() const { return !fDirtyRgn.isEmpty(); } | 57 bool isDirty() const { return !fDirtyRgn.isEmpty(); } |
| 58 bool update(SkIRect* updateArea); | 58 bool update(SkIRect* updateArea); |
| 59 // does not call through to onHandleInval(), but does force the fDirtyRgn | 59 // does not call through to onHandleInval(), but does force the fDirtyRgn |
| 60 // to be wide open. Call before update() to ensure we redraw everything. | 60 // to be wide open. Call before update() to ensure we redraw everything. |
| 61 void forceInvalAll(); | 61 void forceInvalAll(); |
| 62 // return the bounds of the dirty/inval rgn, or [0,0,0,0] if none | 62 // return the bounds of the dirty/inval rgn, or [0,0,0,0] if none |
| 63 const SkIRect& getDirtyBounds() const { return fDirtyRgn.getBounds(); } | 63 const SkIRect& getDirtyBounds() const { return fDirtyRgn.getBounds(); } |
| 64 | 64 |
| 65 bool handleClick(int x, int y, Click::State, void* owner, unsigned modi =
0); | 65 bool handleClick(int x, int y, Click::State, void* owner, unsigned modi =
0); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 #include "SkOSWindow_Win.h" | 130 #include "SkOSWindow_Win.h" |
| 131 #elif defined(SK_BUILD_FOR_ANDROID) | 131 #elif defined(SK_BUILD_FOR_ANDROID) |
| 132 #include "SkOSWindow_Android.h" | 132 #include "SkOSWindow_Android.h" |
| 133 #elif defined(SK_BUILD_FOR_UNIX) | 133 #elif defined(SK_BUILD_FOR_UNIX) |
| 134 #include "SkOSWindow_Unix.h" | 134 #include "SkOSWindow_Unix.h" |
| 135 #elif defined(SK_BUILD_FOR_IOS) | 135 #elif defined(SK_BUILD_FOR_IOS) |
| 136 #include "SkOSWindow_iOS.h" | 136 #include "SkOSWindow_iOS.h" |
| 137 #endif | 137 #endif |
| 138 | 138 |
| 139 #endif | 139 #endif |
| OLD | NEW |