fix [2594950] Flash: Zooming in on some content crashes the Nexus One and causes it to reboot (runtime restart)
We now limit the size of the surface to the maximum size supported by the GPU.
On Nexus One this will 2048 -- it could be different on other devices.
Surface creation fails if the limit is exceeded.
Change-Id: I9ecfc2e9c58c9e283782b61ebfc6b590f71df785
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.h b/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
index 6914d0c..df046af 100644
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
+++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
@@ -76,6 +76,8 @@
PixelFormat getFormat() const;
uint32_t getFlags() const;
void makeCurrent() const;
+ uint32_t getMaxTextureSize() const;
+ uint32_t getMaxViewportDims() const;
uint32_t getPageFlipCount() const;
EGLDisplay getEGLDisplay() const { return mDisplay; }
@@ -104,6 +106,8 @@
PixelFormat mFormat;
uint32_t mFlags;
mutable uint32_t mPageFlipCount;
+ GLint mMaxViewportDims;
+ GLint mMaxTextureSize;
sp<FramebufferNativeWindow> mNativeWindow;
overlay_control_device_t* mOverlayEngine;