am 32551478
: Merge "Fix virtual displays for HWC 1.0" into klp-dev
* commit '32551478fc5417d3b7b5e33a202eb6ca66061f7d': Fix virtual displays for HWC 1.0
This commit is contained in:
commit
7c69616201
@ -218,13 +218,15 @@ status_t DisplayDevice::prepareFrame(const HWComposer& hwc) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DisplayDevice::swapBuffers(HWComposer& hwc) const {
|
void DisplayDevice::swapBuffers(HWComposer& hwc) const {
|
||||||
// We need to call eglSwapBuffers() unless:
|
// We need to call eglSwapBuffers() if:
|
||||||
// (a) there was no GLES composition this frame, or
|
// (1) we don't have a hardware composer, or
|
||||||
// (b) we're using a legacy HWC with no framebuffer target support (in
|
// (2) we did GLES composition this frame, and either
|
||||||
// which case HWComposer::commit() handles things).
|
// (a) we have framebuffer target support (not present on legacy
|
||||||
|
// devices, where HWComposer::commit() handles things); or
|
||||||
|
// (b) this is a virtual display
|
||||||
if (hwc.initCheck() != NO_ERROR ||
|
if (hwc.initCheck() != NO_ERROR ||
|
||||||
(hwc.hasGlesComposition(mHwcDisplayId) &&
|
(hwc.hasGlesComposition(mHwcDisplayId) &&
|
||||||
hwc.supportsFramebufferTarget())) {
|
(hwc.supportsFramebufferTarget() || mType >= DISPLAY_VIRTUAL))) {
|
||||||
EGLBoolean success = eglSwapBuffers(mDisplay, mSurface);
|
EGLBoolean success = eglSwapBuffers(mDisplay, mSurface);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
EGLint error = eglGetError();
|
EGLint error = eglGetError();
|
||||||
|
Loading…
Reference in New Issue
Block a user