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

Side by Side Diff: experimental/HelloSkia/HelloSkia.h

Issue 16337012: Smallest possible desktop application that uses Skia to render stuff. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: GPU support Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW
« no previous file with comments | « no previous file | experimental/HelloSkia/HelloSkia.cpp » ('j') | experimental/HelloSkia/HelloSkia.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698