Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: include/views/SkWindow.h

Issue 1595503002: SampleApp: Remove SkWindow::setColorType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: mac build fix Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « experimental/iOSSampleApp/SkSampleUIView.mm ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 25 matching lines...) Expand all
36 int fStencilBits; 36 int fStencilBits;
37 }; 37 };
38 38
39 SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; } 39 SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; }
40 void setSurfaceProps(const SkSurfaceProps& props) { 40 void setSurfaceProps(const SkSurfaceProps& props) {
41 fSurfaceProps = props; 41 fSurfaceProps = props;
42 } 42 }
43 43
44 const SkBitmap& getBitmap() const { return fBitmap; } 44 const SkBitmap& getBitmap() const { return fBitmap; }
45 45
46 void setColorType(SkColorType); 46 void resize(int width, int height);
47 void resize(int width, int height, SkColorType = kUnknown_SkColorType);
48 47
49 bool isDirty() const { return !fDirtyRgn.isEmpty(); } 48 bool isDirty() const { return !fDirtyRgn.isEmpty(); }
50 bool update(SkIRect* updateArea); 49 bool update(SkIRect* updateArea);
51 // does not call through to onHandleInval(), but does force the fDirtyRgn 50 // does not call through to onHandleInval(), but does force the fDirtyRgn
52 // to be wide open. Call before update() to ensure we redraw everything. 51 // to be wide open. Call before update() to ensure we redraw everything.
53 void forceInvalAll(); 52 void forceInvalAll();
54 // return the bounds of the dirty/inval rgn, or [0,0,0,0] if none 53 // return the bounds of the dirty/inval rgn, or [0,0,0,0] if none
55 const SkIRect& getDirtyBounds() const { return fDirtyRgn.getBounds(); } 54 const SkIRect& getDirtyBounds() const { return fDirtyRgn.getBounds(); }
56 55
57 bool handleClick(int x, int y, Click::State, void* owner, unsigned modi = 0); 56 bool handleClick(int x, int y, Click::State, void* owner, unsigned modi = 0);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 virtual bool onGetFocusView(SkView** focus) const; 88 virtual bool onGetFocusView(SkView** focus) const;
90 virtual bool onSetFocusView(SkView* focus); 89 virtual bool onSetFocusView(SkView* focus);
91 90
92 #if SK_SUPPORT_GPU 91 #if SK_SUPPORT_GPU
93 GrRenderTarget* renderTarget(const AttachmentInfo& attachmentInfo, 92 GrRenderTarget* renderTarget(const AttachmentInfo& attachmentInfo,
94 const GrGLInterface* , GrContext* grContext); 93 const GrGLInterface* , GrContext* grContext);
95 #endif 94 #endif
96 95
97 private: 96 private:
98 SkSurfaceProps fSurfaceProps; 97 SkSurfaceProps fSurfaceProps;
99 SkColorType fColorType;
100 SkBitmap fBitmap; 98 SkBitmap fBitmap;
101 SkRegion fDirtyRgn; 99 SkRegion fDirtyRgn;
102 100
103 SkTDArray<Click*> fClicks; // to track clicks 101 SkTDArray<Click*> fClicks; // to track clicks
104 102
105 SkTDArray<SkOSMenu*> fMenus; 103 SkTDArray<SkOSMenu*> fMenus;
106 104
107 SkView* fFocusView; 105 SkView* fFocusView;
108 bool fWaitingOnInval; 106 bool fWaitingOnInval;
109 107
(...skipping 13 matching lines...) Expand all
123 #include "SkOSWindow_Win.h" 121 #include "SkOSWindow_Win.h"
124 #elif defined(SK_BUILD_FOR_ANDROID) 122 #elif defined(SK_BUILD_FOR_ANDROID)
125 #include "SkOSWindow_Android.h" 123 #include "SkOSWindow_Android.h"
126 #elif defined(SK_BUILD_FOR_UNIX) 124 #elif defined(SK_BUILD_FOR_UNIX)
127 #include "SkOSWindow_Unix.h" 125 #include "SkOSWindow_Unix.h"
128 #elif defined(SK_BUILD_FOR_IOS) 126 #elif defined(SK_BUILD_FOR_IOS)
129 #include "SkOSWindow_iOS.h" 127 #include "SkOSWindow_iOS.h"
130 #endif 128 #endif
131 129
132 #endif 130 #endif
OLDNEW
« no previous file with comments | « experimental/iOSSampleApp/SkSampleUIView.mm ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698