summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/EglManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/EglManager.h')
-rw-r--r--libs/hwui/renderthread/EglManager.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/hwui/renderthread/EglManager.h b/libs/hwui/renderthread/EglManager.h
index ef9effbf9953..8e8bb8b68a1c 100644
--- a/libs/hwui/renderthread/EglManager.h
+++ b/libs/hwui/renderthread/EglManager.h
@@ -33,8 +33,12 @@ class RenderThread;
// and EGLConfig, which are re-used by CanvasContext
class EglManager {
public:
+ explicit EglManager();
+
+ ~EglManager();
+
static const char* eglErrorString();
- // Returns true on success, false on failure
+
void initialize();
bool hasEglContext();
@@ -46,7 +50,7 @@ public:
bool isCurrent(EGLSurface surface) { return mCurrentSurface == surface; }
// Returns true if the current surface changed, false if it was already current
- bool makeCurrent(EGLSurface surface, EGLint* errOut = nullptr);
+ bool makeCurrent(EGLSurface surface, EGLint* errOut = nullptr, bool force = false);
Frame beginFrame(EGLSurface surface);
void damageFrame(const Frame& frame, const SkRect& dirty);
// If this returns true it is mandatory that swapBuffers is called
@@ -60,11 +64,9 @@ public:
void fence();
+ EGLDisplay eglDisplay() const { return mEglDisplay; }
+
private:
- friend class RenderThread;
- explicit EglManager(RenderThread& thread);
- // EglContext is never destroyed, method is purposely not implemented
- ~EglManager();
void initExtensions();
void createPBufferSurface();
@@ -72,8 +74,6 @@ private:
void createContext();
EGLint queryBufferAge(EGLSurface surface);
- RenderThread& mRenderThread;
-
EGLDisplay mEglDisplay;
EGLConfig mEglConfig;
EGLConfig mEglConfigWideGamut;