summaryrefslogtreecommitdiff
path: root/libcopybit
diff options
context:
space:
mode:
authorSaurabh Shah <saurshah@codeaurora.org>2014-12-19 10:05:41 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-12-19 18:30:00 -0800
commit1adcafe634716519f83141894a50d7faf4d2ef2b (patch)
treed4040a60dfb3a6921fa09df718cff6625af9eaf7 /libcopybit
parent69574c0ce85635860c1529f397bff20c13fb77cb (diff)
downloaddisplay-1adcafe634716519f83141894a50d7faf4d2ef2b.tar.gz
gralloc: Allocate cached by default, don't use bitops on SW flags
Allocate gralloc buffers cached by default unless clients specify uncached using PRIVATE_UNCACHED or READ_RARELY or WRITE_RARELY at allocation time. Some clients could use gralloc for allocation but later won't use lock()/unlock() for CPU operations and likely use their own caching methods. Cached by default helps such clients. SW usage flags are not defined as bit values, so do not use bitops on those flags. Change-Id: Id371de2ec6efbfa0ed84172b3540f3ebc8f5d459
Diffstat (limited to 'libcopybit')
-rw-r--r--libcopybit/copybit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcopybit/copybit.cpp b/libcopybit/copybit.cpp
index da18c7bf..e4624e0b 100644
--- a/libcopybit/copybit.cpp
+++ b/libcopybit/copybit.cpp
@@ -505,7 +505,8 @@ static int stretch_copybit(
int flags = 0;
private_handle_t* src_hnd = (private_handle_t*)src->handle;
- if(src_hnd != NULL && src_hnd->flags & private_handle_t::PRIV_FLAGS_DO_NOT_FLUSH) {
+ if(src_hnd != NULL &&
+ (!(src_hnd->flags & private_handle_t::PRIV_FLAGS_CACHED))) {
flags |= MDP_BLIT_NON_CACHED;
}