summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/DisplayHardware
diff options
context:
space:
mode:
Diffstat (limited to 'libs/surfaceflinger/DisplayHardware')
-rw-r--r--libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp16
-rw-r--r--libs/surfaceflinger/DisplayHardware/DisplayHardware.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index 7bdf885..8a7abec 100644
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -160,7 +160,7 @@ void DisplayHardware::init(uint32_t dpy)
if (mNativeWindow->isUpdateOnDemand()) {
- mFlags |= UPDATE_ON_DEMAND;
+ mFlags |= PARTIAL_UPDATES;
}
if (eglGetConfigAttrib(display, config, EGL_CONFIG_CAVEAT, &dummy) == EGL_TRUE) {
@@ -174,9 +174,9 @@ void DisplayHardware::init(uint32_t dpy)
surface = eglCreateWindowSurface(display, config, mNativeWindow.get(), NULL);
- if (mFlags & UPDATE_ON_DEMAND) {
- // if we have update on demand, we definitely don't need to
- // preserve the backbuffer, which is usually costly.
+ if (mFlags & PARTIAL_UPDATES) {
+ // if we have partial updates, we definitely don't need to
+ // preserve the backbuffer, which may be costly.
eglSurfaceAttrib(display, surface,
EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
}
@@ -199,9 +199,9 @@ void DisplayHardware::init(uint32_t dpy)
mFlags |= SWAP_RECTANGLE;
}
}
- // when we have the choice between UPDATE_ON_DEMAND and SWAP_RECTANGLE
- // choose UPDATE_ON_DEMAND, which is more efficient
- if (mFlags & UPDATE_ON_DEMAND)
+ // when we have the choice between PARTIAL_UPDATES and SWAP_RECTANGLE
+ // choose PARTIAL_UPDATES, which should be more efficient
+ if (mFlags & PARTIAL_UPDATES)
mFlags &= ~SWAP_RECTANGLE;
#endif
@@ -317,7 +317,7 @@ void DisplayHardware::flip(const Region& dirty) const
}
#endif
- if (mFlags & UPDATE_ON_DEMAND) {
+ if (mFlags & PARTIAL_UPDATES) {
mNativeWindow->setUpdateRectangle(dirty.getBounds());
}
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.h b/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
index b7f1cdb..cb688b7 100644
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
+++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.h
@@ -48,7 +48,7 @@ public:
NPOT_EXTENSION = 0x00000100,
DRAW_TEXTURE_EXTENSION = 0x00000200,
BUFFER_PRESERVED = 0x00010000,
- UPDATE_ON_DEMAND = 0x00020000, // video driver feature
+ PARTIAL_UPDATES = 0x00020000, // video driver feature
SLOW_CONFIG = 0x00040000, // software
SWAP_RECTANGLE = 0x00080000,
};