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

Unified Diff: include/views/SkOSWindow_SDL.h

Issue 1578173002: SampleApp: Cleanup SkOSWindow_SDL (Closed) Base URL: https://skia.googlesource.com/skia.git@sampleapp-02.02-skwindow_win-cleanup
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/views/sdl/SkOSWindow_SDL.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/views/SkOSWindow_SDL.h
diff --git a/include/views/SkOSWindow_SDL.h b/include/views/SkOSWindow_SDL.h
index c40ec2e301fe066980bbcdaba849de6aaf74cc95..e08108add45c4d21cb1ec869fa1e5fa4eb27c5dc 100644
--- a/include/views/SkOSWindow_SDL.h
+++ b/include/views/SkOSWindow_SDL.h
@@ -14,16 +14,11 @@
class SkOSWindow : public SkWindow {
public:
- SkOSWindow(void* screen);
+ SkOSWindow(void*);
virtual ~SkOSWindow();
- static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay) {
- SkFAIL("not implemented\n");
- return false;
- }
-
enum SkBackEndTypes {
- kNone_BackEndType,
+ kNone_BackEndType, // TODO: remove this, it's not a real option.
kNativeGL_BackEndType,
#if SK_ANGLE
kANGLE_BackEndType,
@@ -39,25 +34,23 @@ public:
bool makeFullscreen();
void setVsync(bool);
void closeWindow();
- void loop() {
- while (!fQuit) {
- this->handleEvents();
- this->update(nullptr);
- }
- }
+ static void RunEventLoop();
protected:
void onSetTitle(const char title[]) override;
- void onHandleInval(const SkIRect&) override;
- void onPDFSaved(const char title[], const char desc[], const char path[]) override;
private:
- void handleEvents();
- bool fQuit;
- uint32_t fWindowFlags;
+ void createWindow(int msaaSampleCount);
+ void destroyWindow();
+ void updateWindowTitle();
+ static SkOSWindow* GetInstanceForWindowID(Uint32 windowID);
+ static bool HasDirtyWindows();
+ static void UpdateDirtyWindows();
+ static void HandleEvent(const SDL_Event&);
+
SDL_Window* fWindow;
SDL_GLContext fGLContext;
-
+ int fWindowMSAASampleCount;
typedef SkWindow INHERITED;
};
« no previous file with comments | « no previous file | src/views/sdl/SkOSWindow_SDL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698