diff options
author | Mathias Agopian <mathias@google.com> | 2013-07-08 22:50:01 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-08 22:50:01 +0000 |
commit | 547e98f33c829eb2e3948a57e491a9106afa1f5e (patch) | |
tree | 2b15d4d670e31263502098c639c644e173460023 /services/surfaceflinger/SurfaceFlinger.h | |
parent | ba02cd2f6cc3f59adf66cb2b9176bfe6c9e382d1 (diff) | |
parent | 875d8e1323536e16dcfc90c9674d7ad32116a69a (diff) | |
download | frameworks_native-547e98f33c829eb2e3948a57e491a9106afa1f5e.zip frameworks_native-547e98f33c829eb2e3948a57e491a9106afa1f5e.tar.gz frameworks_native-547e98f33c829eb2e3948a57e491a9106afa1f5e.tar.bz2 |
Merge "Refactor SF. Move all GL operations in their own class."
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.h')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.h | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index cbedda7..21d523b 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -21,7 +21,7 @@ #include <sys/types.h> #include <EGL/egl.h> -#include <GLES/gl.h> +#include <GLES/gl.h> // needed for GLuint #include <cutils/compiler.h> @@ -62,6 +62,7 @@ class IGraphicBufferAlloc; class Layer; class LayerDim; class Surface; +class RenderEngine; // --------------------------------------------------------------------------- @@ -72,13 +73,6 @@ enum { eTransactionMask = 0x07 }; -enum GlesVersion { - GLES_VERSION_1_0 = 0x10000, - GLES_VERSION_1_1 = 0x10001, - GLES_VERSION_2_0 = 0x20000, - GLES_VERSION_3_0 = 0x30000, -}; - class SurfaceFlinger : public BinderService<SurfaceFlinger>, public BnSurfaceComposer, private IBinder::DeathRecipient, @@ -128,9 +122,8 @@ public: // TODO: this should be made accessible only to HWComposer const Vector< sp<Layer> >& getLayerSortedByZForHwcDisplay(int id); - // return the version of the OpenGL ES composition context - GlesVersion getGlesVersion() const { - return mGlesVersion; + RenderEngine& getRenderEngine() const { + return *mRenderEngine; } private: @@ -319,10 +312,8 @@ private: static status_t selectConfigForAttribute(EGLDisplay dpy, EGLint const* attrs, EGLint attribute, EGLint value, EGLConfig* outConfig); static EGLConfig selectEGLConfig(EGLDisplay disp, EGLint visualId); - static EGLContext createGLContext(EGLDisplay disp, EGLConfig config); - void initializeGL(EGLDisplay display); - uint32_t getMaxTextureSize() const; - uint32_t getMaxViewportDims() const; + size_t getMaxTextureSize() const; + size_t getMaxViewportDims() const; /* ------------------------------------------------------------------------ * Display and layer stack management @@ -378,9 +369,6 @@ private: void postFramebuffer(); void drawWormhole(const sp<const DisplayDevice>& hw, const Region& region) const; - GLuint getProtectedTexName() const { - return mProtectedTexName; - } /* ------------------------------------------------------------------------ * Display management @@ -426,17 +414,14 @@ private: // constant members (no synchronization needed for access) HWComposer* mHwc; - GLuint mProtectedTexName; + RenderEngine* mRenderEngine; nsecs_t mBootTime; bool mGpuToCpuSupported; sp<EventThread> mEventThread; - GLint mMaxViewportDims[2]; - GLint mMaxTextureSize; EGLContext mEGLContext; EGLConfig mEGLConfig; EGLDisplay mEGLDisplay; EGLint mEGLNativeVisualId; - GlesVersion mGlesVersion; sp<IBinder> mBuiltinDisplays[DisplayDevice::NUM_DISPLAY_TYPES]; // Can only accessed from the main thread, these members |