summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Caches.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2013-05-09 11:50:12 -0700
committerRomain Guy <romainguy@google.com>2013-06-04 11:57:58 -0700
commitf9f0016b1ff816eb2c7561eed482c056189005f8 (patch)
treeb0d47161a66da155e402391680e157c4788f74bf /libs/hwui/Caches.cpp
parent36e337f971649b00841cc3a0e69869769229af14 (diff)
downloadframeworks_base-f9f0016b1ff816eb2c7561eed482c056189005f8.zip
frameworks_base-f9f0016b1ff816eb2c7561eed482c056189005f8.tar.gz
frameworks_base-f9f0016b1ff816eb2c7561eed482c056189005f8.tar.bz2
Enable GPU pixel buffers on OpenGL ES 3.0 devices
Change-Id: I164d72ccd7a9bf6ae0e3f79dfef50083558937ba
Diffstat (limited to 'libs/hwui/Caches.cpp')
-rw-r--r--libs/hwui/Caches.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index f08b5ca..9d5a854 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -52,6 +52,7 @@ Caches::Caches(): Singleton<Caches>(), mExtensions(Extensions::getInstance()), m
initFont();
initConstraints();
initProperties();
+ initStaticProperties();
initExtensions();
mDebugLevel = readDebugLevel();
@@ -137,6 +138,18 @@ void Caches::initConstraints() {
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
}
+void Caches::initStaticProperties() {
+ gpuPixelBuffersEnabled = false;
+
+ // OpenGL ES 3.0+ specific features
+ if (mExtensions.getMajorGlVersion() >= 3) {
+ char property[PROPERTY_VALUE_MAX];
+ if (property_get(PROPERTY_ENABLE_GPU_PIXEL_BUFFERS, property, "true") > 0) {
+ gpuPixelBuffersEnabled = !strcmp(property, "true");
+ }
+ }
+}
+
bool Caches::initProperties() {
bool prevDebugLayersUpdates = debugLayersUpdates;
bool prevDebugOverdraw = debugOverdraw;