- Fix the copybit source rect calculation for 180 and 270
degrees rotation. Calculate blit rects based on the source crop.
CRs-fixed: 337366
(cherry picked from commit 06aa97757bd7023234d3852801e05e077aaa1d2f)
Change-Id: Iba2e230acd84271fc5649e06918824752aa90670
-Check only for 90 or 270 degrees rotation and interchange
width and height if rotation is one of them.
-make scaling computations in float
CRs-fixed: 337370
(cherry picked from commit 460d7b96c06aa33d61b38d146f76887a49cd8057)
Change-Id: I30255e3926917896223dba7306df60ff7cfa14e2
Fix the software conversion from YV12 to YUV_420_SP
by reading the chroma based on chroma padding involved.
CRs-fixed: 333784
(cherry picked from commit b22b6b191644e3ef618d122d30cef4bb9f87019d)
Change-Id: Ie84c1cbb2635a6197c5a907dac1e720c29a66e6c
Use a temporary buffer to replace inplace conversion
CRs-fixed: 333784
(cherry picked from commit 927542660e4c6106f8062c79bd6461c7fef55b4a)
Change-Id: I044bdaa31faea98552e35267bb78318317d68866
This function can be used from other components
to get the aligned dimensions and size of the buffer
given the width, height and color format.
Change-Id: I8d7532a262194f3883bf0f5166e806e0971392e2
Conflicts:
libgralloc/gpu.cpp
When the HWC_SKIP_COMPOSITION is enabled, continue looping through
the layers instead of breaking the loop. Thus we are assured that
all overlay layers are always drawn.
Change-Id: Ia8d4c7003838cbb86e2f0ea8b5ef2d47516aa011
CRs-fixed: 333986
(cherry picked from commit 8c2a615a0a3d89a5830af3b8117115ae8071bd27)
(cherry picked from commit 11ea4a3635a347182f6b2f8f2ad6e3b394a13eda)
If there is any video layer below the HWC_SKIP_LAYER, we compose that
video layer using the GPU. Unlock any previous video buffer that were
sent to the overlay.
CRs-fixed: 333974
Change-Id: I1937ca8b139f40453a3bccb0b490fd4d65fa1f52
(cherry picked from commit 48a3996a2178244ce6365f97212c55e7ab33752a)
(cherry picked from commit f4a08165b2d3be97b72287fc4001cb5c90d57c07)
It is possible to use this object from multiple threads
and there could be a race between a failure in one thread
and another method call from a different thread which would
result in system calls being called with an invalid fd.
(cherry picked from commit 560ca6e8feb4f52c9aade34fa7cfcfed55288083)
Change-Id: Iefb94ba1ee7177ab20600bee4374daf8e818bdb9
The GENLOCK_IOC_RELEASE ioctl is now deprecated. This was done because to
avoid race conditions where the handle was released before another client
tried to unlock it.
(cherry picked from commit d1514357422ce130d3e2776f984294a9efeea83e)
Change-Id: Iaf433a79dd0dad992cbf67180765718beec4eb1c
CRs-fixed: 333141
Several ioctl calls were returning -1 instead of -errno,
which may confuse upper layers, especially when the error
is -ENOMEM. Also move some existing "err = -errno" calls
to the top of if statements so that errno cannot change
by libc calls in the error handling code.
(cherry picked from commit a8eda532452651eb1fbae419319455de2a078ef0)
Change-Id: I181f98d5a261e8e3e1b3f6ecd3ba288e7b4b5607
Copybit module has a limited stretch to scale a clip.
Hence we need to do a intermediate stretch before going
to final stretch.
(cherry picked from commit 6503d323f9e113c0edf66e724bb422559ecbd5cb)
Change-Id: Ib8ea9a917896985d4f7d7ebf999222f2dc6f6480
This change is done to reduce the CPU utilization by SurfaceFlinger
thread. This feature may be turned On/Off using a compile time flag
(cherry picked from commit 9691e73556e5c0b66553aa55eb504b9ebb0fd400)
Change-Id: I1cb5b5c8abef135bc520c6e39c6ccf236b2270c3
Conflicts:
libqcomui/Android.mk
This change allows composition to fall back to c2d even if the second
layer overlaps the base full screen layer.
CRs-Fixed: 326413
(cherry picked from commit b27338930d5bf3de17d03b06db6169e648d5e5fc)
Change-Id: Iaf1bf706fb216286047452173b58aeba1781cd9b
If there is a SKIP layer present, the SKIP layers are first composited
using the GPU. If there any layer below the SKIP layer that performs
any operations on the FrameBuffer, it results in undesireable results
on the screen e.g. artifacts, since SurfaceFlinger draws the SKIP layers
before the HWComposer.
Change-Id: I198236673e2a0bd19a6087ff01049061547abb47
CRs-fixed: 327392
A Google modification to eglCreateWindowSurface was
causing SurfaceFlinger to set its swap interval
value back to 1, regardless of the value set in the
debug.gr.swapinterval property.
This patch modifies the fb_setSwapInterval function
in gralloc to check the debug.gr.swapinterval
property and not change the swap interval if a value
is set there.
CRs-fixed: 329524
Change-Id: I80463c1209addbff227db7832dd0023e94eb06ac
Fix swapinterval 0 support in class OverlayUI. The missing property
check for swapinterval is added to the new setDisplayParams API.
Change-Id: I3a7cb843f79afa213eb2f88b80e21249f64d61d0
Do not choose GL_EXTERNAL_TEXTURE_OES for all formats, instead,
select between GL_EXTERNAL_TEXTURE_OES, and GL_TEXTURE_2D based
on the pixel format.
This change is done to reduce composition times.
Change-Id: I17edd78cdfa051f88ed6bd4e585c7a9b0705aa3a
CRs-fixed: 328074
This is a helper function that will return false if the given format is
supported by adreno drivers but not supported in GPU HW. For these
formats, adreno will use software color conversion routines to convert
them to acceptable format by the GPU HW. This may be required if we
want to avoid creating texture for certain formats when not absolutely
necessary. Could be defaulted to return true depending on a compile
time flag.
Change-Id: Idb2200b5ed13bb8c184288d44340ed1aefeaa8df
apply:
Author: Ramakant Singh <ramaka@codeaurora.org>
Display/libhwcomposer:Add intermediate stretch for low resolution clips
Copybit module has a limited stretch to scale a clip.
Hence we need to do a intermediate stretch before going
to final stretch.
and cleanup loops in hwc_prepare/set
Change-Id: Ice32e12051c5c4367d1fafe17e804679e6e727c9
The mandate for the width and height to be even is only for the YV12
format. Add this check only for the YV12 format.
Change-Id: I1e8d2de174ecf2e62cd33cc40dfd8e97d70a3a59
The x and y coordinates are derived properly from clip and dest rect with this fix.
- Even if rotation is involved, we need to start reading from the same point.
- Do scaling operation on the delta, and then add the source left and top values.
- If we scale the result of addition, we will not be reading source correctly.
CRs-fixed: 324782
Change-Id: I2876c6a8e48acbf03f80713338f9a17c57863aaa
hwcomposer:
rewrite from default template.
specific for qsd8k
put a hack in to fix screen off animation
builds without liboverlay include which qsd8k doesnt support
Change-Id: Ica8df89be4dba4e92ed4e879e8e821b841e2ef93
Assign the correct blending value
for MDP 3.0, earlier it was
incorrectly assigned to zero
for cases where blending was not needed.
Change-Id: Icec6541616c8a9dc6ffc0e99c5b2936389799656
Refactoring is necessary to attain flexibility in setting mdp overlay params
at runtime, while using composition bypass.
This change includes new APIs for setting crop rectangle, display params and
commiting mdp params, namely setCrop(), setDisplayParams() and commit(),
respectively.
Change-Id: Id57035602baabd954fd6b484be4f63fef632d74b
If an uncached buffer is needed from gralloc, the
client must use the flag GRALLOC_USAGE_PRIVATE_UNCACHED
Change-Id: Ie3fcfee1071a87fa0440600f4ca3e2d7ff6243ed
Align the copybit source and destination buffer according
to the frame buffer pixel format.
CRs-fixed: 327687
Change-Id: I00a0a047f2f6d639202e8395d85902b821e2a65c
Check the is_fg flag along with the other parameters in checkOVState.
This is done so that the is_fg flag can also be updated even if there
are no updates to the geometry.
Change-Id: I82874d01c11eb85fb444c2bdbc50f586db683481
When performing the setup for bypass operations, check the number
of bypass channels that are in open state. If the count does not
match the number of bypass layers, close all the bypass channels.
This is done to prevent the overlay channels from going into an
inconsistent/undefined state.
Change-Id: If471a4b4437e25642586616461c5d745f15b3287
CRs-fixed: 323676
For 2 bytes per pixel format the width might be not alligned to 4
So for such cases we need to use memset16
Change-Id: I22a6c673439c44447ce33faf2ed0615febd70a28