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 16 matching lines...) Expand all Loading... |
27 | 27 |
28 class SkWindow : public SkView { | 28 class SkWindow : public SkView { |
29 public: | 29 public: |
30 SkWindow(); | 30 SkWindow(); |
31 virtual ~SkWindow(); | 31 virtual ~SkWindow(); |
32 | 32 |
33 const SkBitmap& getBitmap() const { return fBitmap; } | 33 const SkBitmap& getBitmap() const { return fBitmap; } |
34 | 34 |
35 void setConfig(SkBitmap::Config); | 35 void setConfig(SkBitmap::Config); |
36 void resize(int width, int height, SkBitmap::Config config = SkBitmap::kN
o_Config); | 36 void resize(int width, int height, SkBitmap::Config config = SkBitmap::kN
o_Config); |
37 void eraseARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b); | |
38 void eraseRGB(U8CPU r, U8CPU g, U8CPU b); | |
39 | 37 |
40 bool isDirty() const { return !fDirtyRgn.isEmpty(); } | 38 bool isDirty() const { return !fDirtyRgn.isEmpty(); } |
41 bool update(SkIRect* updateArea); | 39 bool update(SkIRect* updateArea); |
42 // does not call through to onHandleInval(), but does force the fDirtyRgn | 40 // does not call through to onHandleInval(), but does force the fDirtyRgn |
43 // to be wide open. Call before update() to ensure we redraw everything. | 41 // to be wide open. Call before update() to ensure we redraw everything. |
44 void forceInvalAll(); | 42 void forceInvalAll(); |
45 // return the bounds of the dirty/inval rgn, or [0,0,0,0] if none | 43 // return the bounds of the dirty/inval rgn, or [0,0,0,0] if none |
46 const SkIRect& getDirtyBounds() const { return fDirtyRgn.getBounds(); } | 44 const SkIRect& getDirtyBounds() const { return fDirtyRgn.getBounds(); } |
47 | 45 |
48 bool handleClick(int x, int y, Click::State, void* owner, unsigned modi =
0); | 46 bool handleClick(int x, int y, Click::State, void* owner, unsigned modi =
0); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 #include "SkOSWindow_Android.h" | 110 #include "SkOSWindow_Android.h" |
113 #elif defined(SK_BUILD_FOR_UNIX) | 111 #elif defined(SK_BUILD_FOR_UNIX) |
114 #include "SkOSWindow_Unix.h" | 112 #include "SkOSWindow_Unix.h" |
115 #elif defined(SK_BUILD_FOR_SDL) | 113 #elif defined(SK_BUILD_FOR_SDL) |
116 #include "SkOSWindow_SDL.h" | 114 #include "SkOSWindow_SDL.h" |
117 #elif defined(SK_BUILD_FOR_IOS) | 115 #elif defined(SK_BUILD_FOR_IOS) |
118 #include "SkOSWindow_iOS.h" | 116 #include "SkOSWindow_iOS.h" |
119 #endif | 117 #endif |
120 | 118 |
121 #endif | 119 #endif |
OLD | NEW |