Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2013 Google Inc. | |
| 3 * | |
| 4 * | |
| 5 * Use of this source code is governed by a BSD-style license that can be | |
| 6 * found in the LICENSE file. | |
| 7 * | |
| 8 */ | |
| 9 | |
| 10 #ifndef HelloSkia_DEFINED | |
| 11 #define HelloSkia_DEFINED | |
| 12 | |
| 13 #include "SkWindow.h" | |
| 14 | |
| 15 class GrContext; | |
| 16 class GrGLInterface; | |
| 17 class GrRenderTarget; | |
| 18 | |
| 19 // Comment out the following line if you want to use software rendering. | |
| 20 //#define SK_HelloSkia_ENABLE_GPU | |
|
caryclark
2013/06/05 11:55:33
I'd prefer a runtime switch to a compile time one.
| |
| 21 | |
| 22 class HelloWindow : public SkOSWindow { | |
| 23 public: | |
| 24 HelloWindow(void* hWnd, int argc, char** argv); | |
| 25 ~HelloWindow(); | |
| 26 | |
| 27 void setupBackend(); | |
| 28 | |
| 29 protected: | |
| 30 virtual void draw(SkCanvas* canvas); | |
| 31 | |
| 32 SkCanvas* createCanvas() SK_OVERRIDE; | |
| 33 | |
| 34 SkColor fBGColor; | |
| 35 private: | |
| 36 SkScalar fRotationAngle; | |
| 37 | |
| 38 #ifdef SK_HelloSkia_ENABLE_GPU | |
| 39 GrContext* fContext; | |
| 40 GrRenderTarget* fRenderTarget; | |
| 41 GrGLInterface* fInterface; | |
| 42 #endif | |
| 43 | |
| 44 typedef SkOSWindow INHERITED; | |
| 45 }; | |
| 46 #endif | |
|
caryclark
2013/06/05 11:55:33
remove indent
| |
| OLD | NEW |