gfx/skia/trunk/include/views/SkOSWindow_SDL.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/include/views/SkOSWindow_SDL.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2006 The Android Open Source Project
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +
    1.12 +
    1.13 +#ifndef SkOSWindow_SDL_DEFINED
    1.14 +#define SkOSWindow_SDL_DEFINED
    1.15 +
    1.16 +#include "SDL.h"
    1.17 +#include "SkWindow.h"
    1.18 +
    1.19 +class SkGLCanvas;
    1.20 +
    1.21 +class SkOSWindow : public SkWindow {
    1.22 +public:
    1.23 +    SkOSWindow(void* screen);
    1.24 +    virtual ~SkOSWindow();
    1.25 +
    1.26 +    static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay);
    1.27 +
    1.28 +    void handleSDLEvent(const SDL_Event& event);
    1.29 +
    1.30 +protected:
    1.31 +    // overrides from SkWindow
    1.32 +    virtual void onHandleInval(const SkIRect&);
    1.33 +    // overrides from SkView
    1.34 +    virtual void onAddMenu(const SkOSMenu*);
    1.35 +    virtual void onSetTitle(const char[]);
    1.36 +
    1.37 +private:
    1.38 +    SDL_Surface* fScreen;
    1.39 +    SDL_Surface* fSurface;
    1.40 +    SkGLCanvas* fGLCanvas;
    1.41 +
    1.42 +    void doDraw();
    1.43 +
    1.44 +    typedef SkWindow INHERITED;
    1.45 +};
    1.46 +
    1.47 +#endif

mercurial