summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-01-25 18:56:29 -0800
committerRomain Guy <romainguy@google.com>2012-01-30 12:04:17 -0800
commit530041d3191ce817832a0108514617768e43cda6 (patch)
tree8705f42f34dd66983b6782c23b6046c65d1fdfff /libs/hwui
parentf10d69f30107f27465684630460615443783f2bc (diff)
downloadframeworks_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.cpp4
-rw-r--r--libs/hwui/OpenGLRenderer.h2
-rw-r--r--libs/hwui/Properties.h5
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.
*/