summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-07-04 03:09:30 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-07-04 03:09:30 +0000
commitdea941282e2d714a32a3eab9c73b9585904f6266 (patch)
tree6259031d7b63a433fdf6eb052ad9cd6624610eed
parent7730b71afbcc0667cd3e36553248442f823964f5 (diff)
parent59fda04bfde7411ef949fb9924a32f36d025a941 (diff)
downloadnative-dea941282e2d714a32a3eab9c73b9585904f6266.tar.gz
Snap for 4876468 from 59fda04bfde7411ef949fb9924a32f36d025a941 to pi-dr1-release
Change-Id: I8640c03be0d748e48c5283ee7d999781c4f79ac2
-rw-r--r--cmds/atrace/atrace.cpp2
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp11
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h10
3 files changed, 18 insertions, 5 deletions
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index fe9dd568fc..31e73fbecc 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -200,7 +200,7 @@ static const TracingCategory k_categories[] = {
{ REQ, "events/vmscan/mm_vmscan_direct_reclaim_end/enable" },
{ REQ, "events/vmscan/mm_vmscan_kswapd_wake/enable" },
{ REQ, "events/vmscan/mm_vmscan_kswapd_sleep/enable" },
- { REQ, "events/lowmemorykiller/enable" },
+ { OPT, "events/lowmemorykiller/enable" },
} },
{ "regulators", "Voltage and Current Regulators", 0, {
{ REQ, "events/regulator/enable" },
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index cd51dd1d61..68594661b0 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -223,6 +223,7 @@ SurfaceFlinger::SurfaceFlinger(SurfaceFlinger::SkipInitializationTag)
mVisibleRegionsDirty(false),
mGeometryInvalid(false),
mAnimCompositionPending(false),
+ mBootStage(BootStage::BOOTLOADER),
mDebugRegion(0),
mDebugDDMS(0),
mDebugDisableHWC(0),
@@ -231,7 +232,6 @@ SurfaceFlinger::SurfaceFlinger(SurfaceFlinger::SkipInitializationTag)
mLastSwapBufferTime(0),
mDebugInTransaction(0),
mLastTransactionTime(0),
- mBootFinished(false),
mForceFullDamage(false),
mPrimaryDispSync("PrimaryDispSync"),
mPrimaryHWVsyncEnabled(false),
@@ -498,6 +498,7 @@ void SurfaceFlinger::bootFinished()
sp<LambdaMessage> readProperties = new LambdaMessage([&]() {
readPersistentProperties();
+ mBootStage = BootStage::FINISHED;
});
postMessageAsync(readProperties);
}
@@ -1527,7 +1528,7 @@ void SurfaceFlinger::onMessageReceived(int32_t what) {
bool refreshNeeded = handleMessageTransaction();
refreshNeeded |= handleMessageInvalidate();
refreshNeeded |= mRepaintEverything;
- if (refreshNeeded) {
+ if (refreshNeeded && CC_LIKELY(mBootStage != BootStage::BOOTLOADER)) {
// Signal a refresh if a transaction modified the window state,
// a new buffer was latched, or if HWC has requested a full
// repaint
@@ -2886,6 +2887,12 @@ bool SurfaceFlinger::handlePageFlip()
signalLayerUpdate();
}
+ // enter boot animation on first buffer latch
+ if (CC_UNLIKELY(mBootStage == BootStage::BOOTLOADER && newDataLatched)) {
+ ALOGI("Enter boot animation");
+ mBootStage = BootStage::BOOTANIMATION;
+ }
+
// Only continue with the refresh if there is actually new work to do
return !mLayersWithQueuedFrames.empty() && newDataLatched;
}
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 8da97b1264..afcefdb948 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -808,6 +808,13 @@ private:
sp<Fence> mPreviousPresentFence = Fence::NO_FENCE;
bool mHadClientComposition = false;
+ enum class BootStage {
+ BOOTLOADER,
+ BOOTANIMATION,
+ FINISHED,
+ };
+ BootStage mBootStage;
+
struct HotplugEvent {
hwc2_display_t display;
HWC2::Connection connection = HWC2::Connection::Invalid;
@@ -828,7 +835,6 @@ private:
nsecs_t mLastSwapBufferTime;
volatile nsecs_t mDebugInTransaction;
nsecs_t mLastTransactionTime;
- bool mBootFinished;
bool mForceFullDamage;
bool mPropagateBackpressure = true;
std::unique_ptr<SurfaceInterceptor> mInterceptor =
@@ -878,7 +884,7 @@ private:
static bool useVrFlinger;
std::thread::id mMainThreadId;
- DisplayColorSetting mDisplayColorSetting = DisplayColorSetting::MANAGED;
+ DisplayColorSetting mDisplayColorSetting = DisplayColorSetting::ENHANCED;
// Applied on Display P3 layers when the render intent is non-colorimetric.
mat4 mEnhancedSaturationMatrix;