Skip to content

Instantly share code, notes, and snippets.

@pawitp
Last active December 24, 2015 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawitp/6884849 to your computer and use it in GitHub Desktop.
Save pawitp/6884849 to your computer and use it in GitHub Desktop.
From 8a7dd8133d3280eadba63207b4a3da6ae7261a79 Mon Sep 17 00:00:00 2001
From: Pawit Pornkitprasan <p.pawit@gmail.com>
Date: Tue, 8 Oct 2013 12:12:12 +0700
Subject: [PATCH] sf: temporary disable HWC in landscape
Until we upgrade to 4.2 hwc with 4.2 bootloader (I9082)
Change-Id: Ib3e1874406e7b65378160ec0e5df4cefea546c9f
---
services/surfaceflinger/DisplayHardware/HWComposer.cpp | 5 +++--
services/surfaceflinger/Layer.cpp | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 9b4f2ab..2dc80b5 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -1209,8 +1209,9 @@ void HWComposer::dump(String8& result, char* buffer, size_t SIZE) const {
" type | handle | hints | flags | tr | blend | format | source crop | frame name \n"
"------------+----------+----------+----------+----+-------+----------+---------------------------+--------------------------------\n");
// " __________ | ________ | ________ | ________ | __ | _____ | ________ | [_____,_____,_____,_____] | [_____,_____,_____,_____]
- for (size_t i=0 ; i<disp.list->numHwLayers ; i++) {
- const hwc_layer_1_t&l = disp.list->hwLayers[i];
+ hwc_layer_list_t* list0 = reinterpret_cast<hwc_layer_list_t*>(disp.list);
+ for (size_t i=0 ; i<hwcNumHwLayers(mHwc, disp.list) ; i++) {
+ const hwc_layer_t&l = list0->hwLayers[i];
int32_t format = -1;
String8 name("unknown");
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index c1561b2..1e4178c 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -788,6 +788,8 @@ uint32_t Layer::getEffectiveUsage(uint32_t usage) const
void Layer::updateTransformHint(const sp<const DisplayDevice>& hw) const {
uint32_t orientation = 0;
+// XXX: disable HWC in landscape mode until we can upgrade to 4.1 hwc
+#ifndef SAMSUNG_BCM_AUDIO_BLOB
if (!mFlinger->mDebugDisableTransformHint) {
// The transform hint is used to improve performance, but we can
// only have a single transform hint, it cannot
@@ -798,6 +800,7 @@ void Layer::updateTransformHint(const sp<const DisplayDevice>& hw) const {
orientation = 0;
}
}
+#endif
mSurfaceTexture->setTransformHint(orientation);
}
--
1.8.3.4 (Apple Git-47)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment