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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | experimental/HelloSkia/HelloSkia.cpp » ('j') | experimental/HelloSkia/HelloSkia.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« 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