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

Unified Diff: include/views/SkOSWindow_Android.h

Issue 1164403002: Visual bench on native android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tiny cleanup Created 5 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 | « gyp/visualbench.gyp ('k') | platform_tools/android/app/jni/com_skia_SkiaSampleRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/views/SkOSWindow_Android.h
diff --git a/include/views/SkOSWindow_Android.h b/include/views/SkOSWindow_Android.h
index 3b23d29b7119c8e1c9893f936dc6f92e7693ba8d..2538a3ea8e7f6d392a9ac4b1bc4a53d924d096ac 100644
--- a/include/views/SkOSWindow_Android.h
+++ b/include/views/SkOSWindow_Android.h
@@ -10,10 +10,18 @@
#include "SkWindow.h"
+#include <EGL/egl.h>
+
+struct SkAndroidWindow {
+ EGLDisplay fDisplay;
+ EGLSurface fSurface;
+ EGLContext fContext;
+};
+
class SkOSWindow : public SkWindow {
public:
- SkOSWindow(void*) {}
- ~SkOSWindow() {}
+ SkOSWindow(void*);
+ ~SkOSWindow();
enum SkBackEndTypes {
kNone_BackEndType,
@@ -21,11 +29,13 @@ public:
};
bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo* info);
- void detach() {}
- void present() {}
+ void detach();
+ void present();
+ void closeWindow() override;
+ void setVsync(bool) override;
+ bool destroyRequested() { return fDestroyRequested; }
- virtual void onPDFSaved(const char title[], const char desc[],
- const char path[]);
+ virtual void onPDFSaved(const char title[], const char desc[], const char path[]);
protected:
// overrides from SkWindow
@@ -33,6 +43,10 @@ protected:
virtual void onSetTitle(const char title[]);
private:
+ SkAndroidWindow fWindow;
+ ANativeWindow* fNativeWindow;
+ bool fDestroyRequested;
+
typedef SkWindow INHERITED;
};
« no previous file with comments | « gyp/visualbench.gyp ('k') | platform_tools/android/app/jni/com_skia_SkiaSampleRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698