diff options
author | Romain Guy <romainguy@google.com> | 2012-01-25 18:56:29 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2012-01-30 12:04:17 -0800 |
commit | 530041d3191ce817832a0108514617768e43cda6 (patch) | |
tree | 8705f42f34dd66983b6782c23b6046c65d1fdfff /libs/hwui | |
parent | f10d69f30107f27465684630460615443783f2bc (diff) | |
download | frameworks_base-530041d3191ce817832a0108514617768e43cda6.zip frameworks_base-530041d3191ce817832a0108514617768e43cda6.tar.gz frameworks_base-530041d3191ce817832a0108514617768e43cda6.tar.bz2 |
Add stencil buffer to the EGL config
Change-Id: If76c0cd6127534d90f9526b75c0f8e56259c6722
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 4 | ||||
-rw-r--r-- | libs/hwui/OpenGLRenderer.h | 2 | ||||
-rw-r--r-- | libs/hwui/Properties.h | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index cc0e05e..f7d9040 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -127,6 +127,10 @@ OpenGLRenderer::~OpenGLRenderer() { // Setup /////////////////////////////////////////////////////////////////////////////// +uint32_t OpenGLRenderer::getStencilSize() { + return STENCIL_BUFFER_SIZE; +} + void OpenGLRenderer::setViewport(int width, int height) { mOrthoMatrix.loadOrtho(0, width, height, 0, -1, 1); diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h index ae355bb..d0394af 100644 --- a/libs/hwui/OpenGLRenderer.h +++ b/libs/hwui/OpenGLRenderer.h @@ -141,6 +141,8 @@ public: SkPaint* filterPaint(SkPaint* paint); + ANDROID_API static uint32_t getStencilSize(); + protected: /** * Compose the layer defined in the current snapshot with the layer diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h index 2eae0f1..71fb8da 100644 --- a/libs/hwui/Properties.h +++ b/libs/hwui/Properties.h @@ -37,6 +37,11 @@ // Textures used by layers must have dimensions multiples of this number #define LAYER_SIZE 64 +// Defines the size in bits of the stencil buffer +// Note: We only want 1 bit, but in practice we'll get 8 bits on all GPUs +// for the foreseeable future +#define STENCIL_BUFFER_SIZE 0 + /** * Debug level for app developers. */ |