hardware/qcom/display: Remove glfinish call
There is no need to do a glFinish on every composition complete. glFinish needs to be called for composition cycles where GPU and copybit are both used for composition. This is because the GPU and copybit operate on the same framebuffer. (cherry picked from commit 7983c275ae3eb15fab931d301e6338f83ad4a75a) Change-Id: If06da4ca60ec17122c3dd698558cbf08fec73251
This commit is contained in:
parent
35bec0b0bf
commit
7181de24ab
@ -152,7 +152,6 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer)
|
||||
static int fb_compositionComplete(struct framebuffer_device_t* dev)
|
||||
{
|
||||
// TODO: Properly implement composition complete callback
|
||||
glFinish();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
|
||||
LOCAL_SHARED_LIBRARIES := $(common_libs) libEGL liboverlay libgenlock \
|
||||
libhwcexternal libqdutils libhardware_legacy \
|
||||
libdl libmemalloc libhwcservice
|
||||
libdl libmemalloc libhwcservice libGLESv1_CM
|
||||
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"hwcomposer\"
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define DEBUG_COPYBIT 0
|
||||
#include <copybit.h>
|
||||
#include <genlock.h>
|
||||
#include <GLES/gl.h>
|
||||
#include "hwc_copybit.h"
|
||||
#include "comptype.h"
|
||||
#include "egl_handles.h"
|
||||
@ -185,6 +186,12 @@ bool CopyBit::draw(hwc_context_t *ctx, hwc_layer_list_t *list, EGLDisplay dpy,
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Invoke a glFinish if we are rendering any layers using copybit.
|
||||
// We call glFinish instead of locking the renderBuffer because the
|
||||
// GPU could take longer than the genlock timeout value to complete
|
||||
// rendering
|
||||
glFinish();
|
||||
|
||||
for (size_t i=0; i<list->numHwLayers; i++) {
|
||||
if (list->hwLayers[i].compositionType == HWC_USE_COPYBIT) {
|
||||
retVal = drawLayerUsingCopybit(ctx, &(list->hwLayers[i]),
|
||||
|
Loading…
Reference in New Issue
Block a user