Loading include/gui/GLConsumer.h +7 −7 Original line number Diff line number Diff line Loading @@ -19,8 +19,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <gui/IGraphicBufferProducer.h> #include <gui/BufferQueue.h> Loading Loading @@ -54,6 +52,8 @@ class String8; * This class was previously called SurfaceTexture. */ class GLConsumer : public ConsumerBase { protected: enum { TEXTURE_EXTERNAL = 0x8D65 }; // GL_TEXTURE_EXTERNAL_OES public: typedef ConsumerBase::FrameAvailableListener FrameAvailableListener; Loading Loading @@ -82,7 +82,7 @@ public: // context to another. If such a transfer is not needed there is no // requirement that either of these methods be called. GLConsumer(const sp<IGraphicBufferConsumer>& bq, GLuint tex, GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, uint32_t tex, uint32_t texureTarget = TEXTURE_EXTERNAL, bool useFenceSync = true, bool isControlledByApp = false); // updateTexImage acquires the most recently queued buffer, and sets the Loading Loading @@ -160,7 +160,7 @@ public: // getCurrentTextureTarget returns the texture target of the current // texture as returned by updateTexImage(). GLenum getCurrentTextureTarget() const; uint32_t getCurrentTextureTarget() const; // getCurrentCrop returns the cropping rectangle of the current buffer. Rect getCurrentCrop() const; Loading Loading @@ -215,7 +215,7 @@ public: // call to attachToContext will result in this texture object being bound to // the texture target and populated with the image contents that were // current at the time of the last call to detachFromContext. status_t attachToContext(GLuint tex); status_t attachToContext(uint32_t tex); protected: Loading Loading @@ -347,7 +347,7 @@ private: // mTexName is the name of the OpenGL texture to which streamed images will // be bound when updateTexImage is called. It is set at construction time // and can be changed with a call to attachToContext. GLuint mTexName; uint32_t mTexName; // mUseFenceSync indicates whether creation of the EGL_KHR_fence_sync // extension should be used to prevent buffers from being dequeued before Loading @@ -362,7 +362,7 @@ private: // glCopyTexSubImage to read from the texture. This is a hack to work // around a GL driver limitation on the number of FBO attachments, which the // browser's tile cache exceeds. const GLenum mTexTarget; const uint32_t mTexTarget; // EGLSlot contains the information and object references that // GLConsumer maintains about a BufferQueue buffer slot. Loading include/gui/Surface.h +0 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ #define ANDROID_GUI_SURFACE_H #include <gui/IGraphicBufferProducer.h> #include <gui/GLConsumer.h> #include <gui/BufferQueue.h> #include <ui/ANativeObjectBase.h> Loading libs/gui/GLConsumer.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -89,8 +89,8 @@ static void mtxMul(float out[16], const float a[16], const float b[16]); Mutex GLConsumer::sStaticInitLock; sp<GraphicBuffer> GLConsumer::sReleasedTexImageBuffer; GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, GLuint tex, GLenum texTarget, bool useFenceSync, bool isControlledByApp) : GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex, uint32_t texTarget, bool useFenceSync, bool isControlledByApp) : ConsumerBase(bq, isControlledByApp), mCurrentTransform(0), mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE), Loading Loading @@ -523,7 +523,7 @@ status_t GLConsumer::detachFromContext() { return OK; } status_t GLConsumer::attachToContext(GLuint tex) { status_t GLConsumer::attachToContext(uint32_t tex) { ATRACE_CALL(); ST_LOGV("attachToContext"); Mutex::Autolock lock(mMutex); Loading Loading @@ -554,7 +554,7 @@ status_t GLConsumer::attachToContext(GLuint tex) { // We need to bind the texture regardless of whether there's a current // buffer. glBindTexture(mTexTarget, tex); glBindTexture(mTexTarget, GLuint(tex)); if (mCurrentTextureBuf != NULL) { // The EGLImageKHR that was associated with the slot was destroyed when Loading Loading @@ -689,7 +689,7 @@ bool GLConsumer::isExternalFormat(uint32_t format) return false; } GLenum GLConsumer::getCurrentTextureTarget() const { uint32_t GLConsumer::getCurrentTextureTarget() const { return mTexTarget; } Loading services/surfaceflinger/Android.mk +7 −1 Original line number Diff line number Diff line Loading @@ -19,10 +19,15 @@ LOCAL_SRC_FILES:= \ DisplayHardware/VirtualDisplaySurface.cpp \ EventLog/EventLogTags.logtags \ EventLog/EventLog.cpp \ RenderEngine/Description.cpp \ RenderEngine/Mesh.cpp \ RenderEngine/Program.cpp \ RenderEngine/ProgramCache.cpp \ RenderEngine/GLExtensions.cpp \ RenderEngine/RenderEngine.cpp \ RenderEngine/GLES10RenderEngine.cpp \ RenderEngine/GLES11RenderEngine.cpp RenderEngine/GLES11RenderEngine.cpp \ RenderEngine/GLES20RenderEngine.cpp LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" Loading Loading @@ -56,6 +61,7 @@ LOCAL_SHARED_LIBRARIES := \ libutils \ libEGL \ libGLESv1_CM \ libGLESv2 \ libbinder \ libui \ libgui Loading services/surfaceflinger/DisplayDevice.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, EGLContext ctx) const { void DisplayDevice::setViewportAndProjection() const { size_t w = mDisplayWidth; size_t h = mDisplayHeight; mFlinger->getRenderEngine().setViewportAndProjection(w, h); mFlinger->getRenderEngine().setViewportAndProjection(w, h, w, h, false); } // ---------------------------------------------------------------------------- Loading Loading
include/gui/GLConsumer.h +7 −7 Original line number Diff line number Diff line Loading @@ -19,8 +19,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <gui/IGraphicBufferProducer.h> #include <gui/BufferQueue.h> Loading Loading @@ -54,6 +52,8 @@ class String8; * This class was previously called SurfaceTexture. */ class GLConsumer : public ConsumerBase { protected: enum { TEXTURE_EXTERNAL = 0x8D65 }; // GL_TEXTURE_EXTERNAL_OES public: typedef ConsumerBase::FrameAvailableListener FrameAvailableListener; Loading Loading @@ -82,7 +82,7 @@ public: // context to another. If such a transfer is not needed there is no // requirement that either of these methods be called. GLConsumer(const sp<IGraphicBufferConsumer>& bq, GLuint tex, GLenum texTarget = GL_TEXTURE_EXTERNAL_OES, uint32_t tex, uint32_t texureTarget = TEXTURE_EXTERNAL, bool useFenceSync = true, bool isControlledByApp = false); // updateTexImage acquires the most recently queued buffer, and sets the Loading Loading @@ -160,7 +160,7 @@ public: // getCurrentTextureTarget returns the texture target of the current // texture as returned by updateTexImage(). GLenum getCurrentTextureTarget() const; uint32_t getCurrentTextureTarget() const; // getCurrentCrop returns the cropping rectangle of the current buffer. Rect getCurrentCrop() const; Loading Loading @@ -215,7 +215,7 @@ public: // call to attachToContext will result in this texture object being bound to // the texture target and populated with the image contents that were // current at the time of the last call to detachFromContext. status_t attachToContext(GLuint tex); status_t attachToContext(uint32_t tex); protected: Loading Loading @@ -347,7 +347,7 @@ private: // mTexName is the name of the OpenGL texture to which streamed images will // be bound when updateTexImage is called. It is set at construction time // and can be changed with a call to attachToContext. GLuint mTexName; uint32_t mTexName; // mUseFenceSync indicates whether creation of the EGL_KHR_fence_sync // extension should be used to prevent buffers from being dequeued before Loading @@ -362,7 +362,7 @@ private: // glCopyTexSubImage to read from the texture. This is a hack to work // around a GL driver limitation on the number of FBO attachments, which the // browser's tile cache exceeds. const GLenum mTexTarget; const uint32_t mTexTarget; // EGLSlot contains the information and object references that // GLConsumer maintains about a BufferQueue buffer slot. Loading
include/gui/Surface.h +0 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ #define ANDROID_GUI_SURFACE_H #include <gui/IGraphicBufferProducer.h> #include <gui/GLConsumer.h> #include <gui/BufferQueue.h> #include <ui/ANativeObjectBase.h> Loading
libs/gui/GLConsumer.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -89,8 +89,8 @@ static void mtxMul(float out[16], const float a[16], const float b[16]); Mutex GLConsumer::sStaticInitLock; sp<GraphicBuffer> GLConsumer::sReleasedTexImageBuffer; GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, GLuint tex, GLenum texTarget, bool useFenceSync, bool isControlledByApp) : GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex, uint32_t texTarget, bool useFenceSync, bool isControlledByApp) : ConsumerBase(bq, isControlledByApp), mCurrentTransform(0), mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE), Loading Loading @@ -523,7 +523,7 @@ status_t GLConsumer::detachFromContext() { return OK; } status_t GLConsumer::attachToContext(GLuint tex) { status_t GLConsumer::attachToContext(uint32_t tex) { ATRACE_CALL(); ST_LOGV("attachToContext"); Mutex::Autolock lock(mMutex); Loading Loading @@ -554,7 +554,7 @@ status_t GLConsumer::attachToContext(GLuint tex) { // We need to bind the texture regardless of whether there's a current // buffer. glBindTexture(mTexTarget, tex); glBindTexture(mTexTarget, GLuint(tex)); if (mCurrentTextureBuf != NULL) { // The EGLImageKHR that was associated with the slot was destroyed when Loading Loading @@ -689,7 +689,7 @@ bool GLConsumer::isExternalFormat(uint32_t format) return false; } GLenum GLConsumer::getCurrentTextureTarget() const { uint32_t GLConsumer::getCurrentTextureTarget() const { return mTexTarget; } Loading
services/surfaceflinger/Android.mk +7 −1 Original line number Diff line number Diff line Loading @@ -19,10 +19,15 @@ LOCAL_SRC_FILES:= \ DisplayHardware/VirtualDisplaySurface.cpp \ EventLog/EventLogTags.logtags \ EventLog/EventLog.cpp \ RenderEngine/Description.cpp \ RenderEngine/Mesh.cpp \ RenderEngine/Program.cpp \ RenderEngine/ProgramCache.cpp \ RenderEngine/GLExtensions.cpp \ RenderEngine/RenderEngine.cpp \ RenderEngine/GLES10RenderEngine.cpp \ RenderEngine/GLES11RenderEngine.cpp RenderEngine/GLES11RenderEngine.cpp \ RenderEngine/GLES20RenderEngine.cpp LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\" Loading Loading @@ -56,6 +61,7 @@ LOCAL_SHARED_LIBRARIES := \ libutils \ libEGL \ libGLESv1_CM \ libGLESv2 \ libbinder \ libui \ libgui Loading
services/surfaceflinger/DisplayDevice.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ EGLBoolean DisplayDevice::makeCurrent(EGLDisplay dpy, EGLContext ctx) const { void DisplayDevice::setViewportAndProjection() const { size_t w = mDisplayWidth; size_t h = mDisplayHeight; mFlinger->getRenderEngine().setViewportAndProjection(w, h); mFlinger->getRenderEngine().setViewportAndProjection(w, h, w, h, false); } // ---------------------------------------------------------------------------- Loading