OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkOSWindow_Android.h" | 8 #include "SkOSWindow_Android.h" |
9 | 9 |
10 #include <GLES/gl.h> | 10 #include <GLES/gl.h> |
11 | 11 |
12 SkOSWindow::SkOSWindow(void* hwnd) { | 12 SkOSWindow::SkOSWindow(void* hwnd) { |
13 fWindow.fDisplay = EGL_NO_DISPLAY; | 13 fWindow.fDisplay = EGL_NO_DISPLAY; |
14 fWindow.fContext = EGL_NO_CONTEXT; | 14 fWindow.fContext = EGL_NO_CONTEXT; |
15 fWindow.fSurface = EGL_NO_SURFACE; | 15 fWindow.fSurface = EGL_NO_SURFACE; |
16 fNativeWindow = (ANativeWindow*)hwnd; | 16 fNativeWindow = (ANativeWindow*)hwnd; |
17 fDestroyRequested = false; | 17 fDestroyRequested = false; |
18 } | 18 } |
19 | 19 |
20 SkOSWindow::~SkOSWindow() { | 20 SkOSWindow::~SkOSWindow() { |
21 this->release(); | 21 this->release(); |
22 } | 22 } |
23 | 23 |
24 bool SkOSWindow::attach(SkBackEndTypes attachType, | 24 bool SkOSWindow::attach(SkBackEndTypes attachType, |
25 int /*msaaSampleCount*/, | 25 int /*msaaSampleCount*/, |
26 bool /*deepColor*/ | 26 bool /*deepColor*/, |
27 AttachmentInfo* info) { | 27 AttachmentInfo* info) { |
28 static const EGLint kEGLContextAttribsForOpenGL[] = { | 28 static const EGLint kEGLContextAttribsForOpenGL[] = { |
29 EGL_NONE | 29 EGL_NONE |
30 }; | 30 }; |
31 | 31 |
32 static const EGLint kEGLContextAttribsForOpenGLES[] = { | 32 static const EGLint kEGLContextAttribsForOpenGLES[] = { |
33 EGL_CONTEXT_CLIENT_VERSION, 2, | 33 EGL_CONTEXT_CLIENT_VERSION, 2, |
34 EGL_NONE | 34 EGL_NONE |
35 }; | 35 }; |
36 | 36 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 /////////////////////////////////////////// | 192 /////////////////////////////////////////// |
193 /////////////// SkEvent impl ////////////// | 193 /////////////// SkEvent impl ////////////// |
194 /////////////////////////////////////////// | 194 /////////////////////////////////////////// |
195 | 195 |
196 void SkEvent::SignalQueueTimer(SkMSec ms) { | 196 void SkEvent::SignalQueueTimer(SkMSec ms) { |
197 } | 197 } |
198 | 198 |
199 void SkEvent::SignalNonEmptyQueue() { | 199 void SkEvent::SignalNonEmptyQueue() { |
200 } | 200 } |
OLD | NEW |