9ee0e32886
This CL comes after https://codereview.chromium.org/121303004/. BUG= R=robertphillips@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/122453003 git-svn-id: http://skia.googlecode.com/svn/trunk@12923 2bbb7eff-a529-9590-31e7-b0007b416f81
51 lines
964 B
C++
51 lines
964 B
C++
/*
|
|
* Copyright 2013 Google Inc.
|
|
*
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*
|
|
*/
|
|
|
|
#ifndef SkV8Example_DEFINED
|
|
#define SkV8Example_DEFINED
|
|
|
|
#include "SkWindow.h"
|
|
|
|
class GrContext;
|
|
class GrGLInterface;
|
|
class GrRenderTarget;
|
|
|
|
class JsContext;
|
|
|
|
class SkV8ExampleWindow : public SkOSWindow {
|
|
public:
|
|
SkV8ExampleWindow(void* hwnd, JsContext* canvas);
|
|
|
|
protected:
|
|
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE;
|
|
virtual void onSizeChange() SK_OVERRIDE;
|
|
|
|
#if SK_SUPPORT_GPU
|
|
virtual SkCanvas* createCanvas() SK_OVERRIDE;
|
|
#endif
|
|
|
|
#ifdef SK_BUILD_FOR_WIN
|
|
virtual void onHandleInval(const SkIRect&) SK_OVERRIDE;
|
|
#endif
|
|
|
|
void windowSizeChanged();
|
|
|
|
private:
|
|
typedef SkOSWindow INHERITED;
|
|
JsContext* fJsContext;
|
|
|
|
#if SK_SUPPORT_GPU
|
|
GrContext* fCurContext;
|
|
const GrGLInterface* fCurIntf;
|
|
GrRenderTarget* fCurRenderTarget;
|
|
#endif
|
|
};
|
|
|
|
#endif
|