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

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

Issue 580073003: use surface in SkView/SampleApp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | samplecode/SampleApp.h » ('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
11 #include "SkView.h" 11 #include "SkView.h"
12 #include "SkBitmap.h" 12 #include "SkBitmap.h"
13 #include "SkMatrix.h" 13 #include "SkMatrix.h"
14 #include "SkRegion.h" 14 #include "SkRegion.h"
15 #include "SkEvent.h" 15 #include "SkEvent.h"
16 #include "SkKey.h" 16 #include "SkKey.h"
17 #include "SkTDArray.h" 17 #include "SkTDArray.h"
18 18
19 #ifdef SK_BUILD_FOR_WINCEx 19 #ifdef SK_BUILD_FOR_WINCEx
20 #define SHOW_FPS 20 #define SHOW_FPS
21 #endif 21 #endif
22 //#define USE_GX_SCREEN 22 //#define USE_GX_SCREEN
23 23
24 class SkCanvas; 24 class SkSurface;
25
26 class SkOSMenu; 25 class SkOSMenu;
27 26
28 class SkWindow : public SkView { 27 class SkWindow : public SkView {
29 public: 28 public:
30 SkWindow(); 29 SkWindow();
31 virtual ~SkWindow(); 30 virtual ~SkWindow();
32 31
33 const SkBitmap& getBitmap() const { return fBitmap; } 32 const SkBitmap& getBitmap() const { return fBitmap; }
34 33
35 void setColorType(SkColorType); 34 void setColorType(SkColorType);
(...skipping 16 matching lines...) Expand all
52 const SkTDArray<SkOSMenu*>* getMenus() { return &fMenus; } 51 const SkTDArray<SkOSMenu*>* getMenus() { return &fMenus; }
53 52
54 const char* getTitle() const { return fTitle.c_str(); } 53 const char* getTitle() const { return fTitle.c_str(); }
55 void setTitle(const char title[]); 54 void setTitle(const char title[]);
56 55
57 const SkMatrix& getMatrix() const { return fMatrix; } 56 const SkMatrix& getMatrix() const { return fMatrix; }
58 void setMatrix(const SkMatrix&); 57 void setMatrix(const SkMatrix&);
59 void preConcat(const SkMatrix&); 58 void preConcat(const SkMatrix&);
60 void postConcat(const SkMatrix&); 59 void postConcat(const SkMatrix&);
61 60
62 virtual SkCanvas* createCanvas(); 61 virtual SkSurface* createSurface();
63 62
64 virtual void onPDFSaved(const char title[], const char desc[], 63 virtual void onPDFSaved(const char title[], const char desc[],
65 const char path[]) {} 64 const char path[]) {}
66 protected: 65 protected:
67 virtual bool onEvent(const SkEvent&); 66 virtual bool onEvent(const SkEvent&);
68 virtual bool onDispatchClick(int x, int y, Click::State, void* owner, unsign ed modi); 67 virtual bool onDispatchClick(int x, int y, Click::State, void* owner, unsign ed modi);
69 // called if part of our bitmap is invalidated 68 // called if part of our bitmap is invalidated
70 virtual void onHandleInval(const SkIRect&); 69 virtual void onHandleInval(const SkIRect&);
71 virtual bool onHandleChar(SkUnichar); 70 virtual bool onHandleChar(SkUnichar);
72 virtual bool onHandleKey(SkKey); 71 virtual bool onHandleKey(SkKey);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #include "SkOSWindow_Android.h" 109 #include "SkOSWindow_Android.h"
111 #elif defined(SK_BUILD_FOR_UNIX) 110 #elif defined(SK_BUILD_FOR_UNIX)
112 #include "SkOSWindow_Unix.h" 111 #include "SkOSWindow_Unix.h"
113 #elif defined(SK_BUILD_FOR_SDL) 112 #elif defined(SK_BUILD_FOR_SDL)
114 #include "SkOSWindow_SDL.h" 113 #include "SkOSWindow_SDL.h"
115 #elif defined(SK_BUILD_FOR_IOS) 114 #elif defined(SK_BUILD_FOR_IOS)
116 #include "SkOSWindow_iOS.h" 115 #include "SkOSWindow_iOS.h"
117 #endif 116 #endif
118 117
119 #endif 118 #endif
OLDNEW
« no previous file with comments | « no previous file | samplecode/SampleApp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698