more splitting of Surface/SurfaceControl. Surface.java is now implemented in terms of Surface and SurfaceControl.
The WindowManager side of Surface.java holds a SurfaceControl, while the client-side holds a Surface. When the client is in the system process, Surface.java holds both (which is a problem we'll try to fix later).
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index a5c1e8f..a63a282 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -45,7 +45,6 @@
#include "clz.h"
#include "BufferAllocator.h"
-#include "CPUGauge.h"
#include "Layer.h"
#include "LayerBlur.h"
#include "LayerBuffer.h"
@@ -179,7 +178,6 @@
mFreezeCount(0),
mFreezeDisplayTime(0),
mDebugRegion(0),
- mDebugCpu(0),
mDebugFps(0),
mDebugBackground(0),
mDebugNoBootAnimation(0),
@@ -199,8 +197,6 @@
char value[PROPERTY_VALUE_MAX];
property_get("debug.sf.showupdates", value, "0");
mDebugRegion = atoi(value);
- property_get("debug.sf.showcpu", value, "0");
- mDebugCpu = atoi(value);
property_get("debug.sf.showbackground", value, "0");
mDebugBackground = atoi(value);
property_get("debug.sf.showfps", value, "0");
@@ -209,7 +205,6 @@
mDebugNoBootAnimation = atoi(value);
LOGI_IF(mDebugRegion, "showupdates enabled");
- LOGI_IF(mDebugCpu, "showcpu enabled");
LOGI_IF(mDebugBackground, "showbackground enabled");
LOGI_IF(mDebugFps, "showfps enabled");
LOGI_IF(mDebugNoBootAnimation, "boot animation disabled");
@@ -413,10 +408,6 @@
mOrientationAnimation = new OrientationAnimation(this);
- // start CPU gauge display
- if (mDebugCpu)
- mCpuGauge = new CPUGauge(this, ms2ns(500));
-
// the boot animation!
if (mDebugNoBootAnimation == false)
mBootAnimation = new BootAnimation(this);
@@ -509,11 +500,6 @@
unlockClients();
executeScheduledBroadcasts();
- // sample the cpu gauge
- if (UNLIKELY(mDebugCpu)) {
- handleDebugCpu();
- }
-
postFramebuffer();
} else {
// pretend we did the post
@@ -905,13 +891,6 @@
mLastScheduledBroadcast = 0;
}
-void SurfaceFlinger::handleDebugCpu()
-{
- Mutex::Autolock _l(mDebugLock);
- if (mCpuGauge != 0)
- mCpuGauge->sample();
-}
-
void SurfaceFlinger::debugFlashRegions()
{
if (UNLIKELY(!mDirtyRegion.isRect())) {
@@ -1502,20 +1481,7 @@
}
int n;
switch (code) {
- case 1000: // SHOW_CPU
- n = data.readInt32();
- mDebugCpu = n ? 1 : 0;
- if (mDebugCpu) {
- if (mCpuGauge == 0) {
- mCpuGauge = new CPUGauge(this, ms2ns(500));
- }
- } else {
- if (mCpuGauge != 0) {
- mCpuGauge->requestExitAndWait();
- Mutex::Autolock _l(mDebugLock);
- mCpuGauge.clear();
- }
- }
+ case 1000: // SHOW_CPU, NOT SUPPORTED ANYMORE
return NO_ERROR;
case 1001: // SHOW_FPS
n = data.readInt32();
@@ -1540,7 +1506,7 @@
mFreezeCount = data.readInt32();
return NO_ERROR;
case 1010: // interrogate.
- reply->writeInt32(mDebugCpu);
+ reply->writeInt32(0);
reply->writeInt32(0);
reply->writeInt32(mDebugRegion);
reply->writeInt32(mDebugBackground);