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

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

Issue 1410703009: Revert of Wire up SDL on Android (Closed) Base URL: https://skia.googlesource.com/skia.git@sdl
Patch Set: Created 5 years, 1 month 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 | « gyp/visualbench.gyp ('k') | include/views/SkWindow.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 /*
2 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
3 * 4 *
4 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 6 * found in the LICENSE file.
6 */ 7 */
7 8
9
8 #ifndef SkOSWindow_SDL_DEFINED 10 #ifndef SkOSWindow_SDL_DEFINED
9 #define SkOSWindow_SDL_DEFINED 11 #define SkOSWindow_SDL_DEFINED
10 12
11 #include "SDL.h" 13 #include "SDL.h"
12 #include "SDL_opengl.h" 14 #include "SDL_opengl.h"
13 #include "SkWindow.h" 15 #include "SkWindow.h"
14 16
17
15 class SkOSWindow : public SkWindow { 18 class SkOSWindow : public SkWindow {
16 public: 19 public:
17 SkOSWindow(void* screen); 20 SkOSWindow(void* screen);
18 virtual ~SkOSWindow(); 21 virtual ~SkOSWindow();
19 22
20 static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay) { 23 static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay) { SkFAIL("n ot implemented\n");
21 SkFAIL("not implemented\n"); 24 return false;
22 return false;
23 } 25 }
24 26
25 enum SkBackEndTypes { 27 enum SkBackEndTypes {
26 kNone_BackEndType, 28 kNone_BackEndType,
27 kNativeGL_BackEndType, 29 kNativeGL_BackEndType,
28 #if SK_ANGLE 30 #if SK_ANGLE
29 kANGLE_BackEndType, 31 kANGLE_BackEndType,
30 #endif // SK_ANGLE 32 #endif // SK_ANGLE
31 #if SK_COMMAND_BUFFER 33 #if SK_COMMAND_BUFFER
32 kCommandBuffer_BackEndType, 34 kCommandBuffer_BackEndType,
33 #endif // SK_COMMAND_BUFFER 35 #endif // SK_COMMAND_BUFFER
34 }; 36 };
35 37
36 void detach(); 38 void detach();
37 bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*) ; 39 bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*) ;
38 void present(); 40 void present();
39 bool makeFullscreen(); 41 bool makeFullscreen();
40 void setVsync(bool); 42 void setVsync(bool);
41 void closeWindow(); 43 void closeWindow();
42 void loop() { 44 void loop() {
43 while (!fQuit) { 45 while (!fQuit) {
44 this->handleEvents(); 46 this->handleEvents();
45 this->update(nullptr); 47 this->update(nullptr);
46 } 48 }
47 } 49 }
48 50
49 protected: 51 protected:
50 void onSetTitle(const char title[]) override; 52 void onSetTitle(const char title[]) override;
51 void onHandleInval(const SkIRect&) override;
52 void onPDFSaved(const char title[], const char desc[], const char path[]) ov erride;
53 53
54 private: 54 private:
55 void handleEvents(); 55 void handleEvents();
56 bool fQuit; 56 bool fQuit;
57 uint32_t fWindowFlags;
58 SDL_Window* fWindow; 57 SDL_Window* fWindow;
59 SDL_GLContext fGLContext; 58 SDL_GLContext fGLContext;
60 59
61 typedef SkWindow INHERITED; 60 typedef SkWindow INHERITED;
62 }; 61 };
63 62
64 #endif 63 #endif
OLDNEW
« no previous file with comments | « gyp/visualbench.gyp ('k') | include/views/SkWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698