Chromium Code Reviews| Index: experimental/HelloSkia/HelloSkia.h |
| diff --git a/experimental/HelloSkia/HelloSkia.h b/experimental/HelloSkia/HelloSkia.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d765df37b492898db6ee3b40d2dff7f6b97bfbdb |
| --- /dev/null |
| +++ b/experimental/HelloSkia/HelloSkia.h |
| @@ -0,0 +1,46 @@ |
| +/* |
| + * 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 HelloSkia_DEFINED |
| +#define HelloSkia_DEFINED |
| + |
| +#include "SkWindow.h" |
| + |
| +class GrContext; |
| +class GrGLInterface; |
| +class GrRenderTarget; |
| + |
| +// Comment out the following line if you want to use software rendering. |
| +//#define SK_HelloSkia_ENABLE_GPU |
|
caryclark
2013/06/05 11:55:33
I'd prefer a runtime switch to a compile time one.
|
| + |
| +class HelloWindow : public SkOSWindow { |
| +public: |
| + HelloWindow(void* hWnd, int argc, char** argv); |
| + ~HelloWindow(); |
| + |
| + void setupBackend(); |
| + |
| +protected: |
| + virtual void draw(SkCanvas* canvas); |
| + |
| + SkCanvas* createCanvas() SK_OVERRIDE; |
| + |
| + SkColor fBGColor; |
| +private: |
| + SkScalar fRotationAngle; |
| + |
| +#ifdef SK_HelloSkia_ENABLE_GPU |
| + GrContext* fContext; |
| + GrRenderTarget* fRenderTarget; |
| + GrGLInterface* fInterface; |
| +#endif |
| + |
| + typedef SkOSWindow INHERITED; |
| +}; |
| + #endif |
|
caryclark
2013/06/05 11:55:33
remove indent
|