Skip to content

Commit 0db7590

Browse files
committed
remove dead/usnused code
Change-Id: I6fa2bc6ee01790abd2c1533f043d61a5e5c8d26e
1 parent 7e9a370 commit 0db7590

File tree

8 files changed

+0
-220
lines changed

8 files changed

+0
-220
lines changed

include/ui/GraphicLog.h

Lines changed: 0 additions & 70 deletions
This file was deleted.

libs/ui/Android.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ LOCAL_SRC_FILES:= \
4747
GraphicBuffer.cpp \
4848
GraphicBufferAllocator.cpp \
4949
GraphicBufferMapper.cpp \
50-
GraphicLog.cpp \
5150
InputTransport.cpp \
5251
PixelFormat.cpp \
5352
Rect.cpp \

libs/ui/FramebufferNativeWindow.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
#include <ui/Rect.h>
3131
#include <ui/FramebufferNativeWindow.h>
32-
#include <ui/GraphicLog.h>
3332

3433
#include <EGL/egl.h>
3534

@@ -211,9 +210,6 @@ int FramebufferNativeWindow::dequeueBuffer(ANativeWindow* window,
211210
if (self->mBufferHead >= self->mNumBuffers)
212211
self->mBufferHead = 0;
213212

214-
GraphicLog& logger(GraphicLog::getInstance());
215-
logger.log(GraphicLog::SF_FB_DEQUEUE_BEFORE, index);
216-
217213
// wait for a free buffer
218214
while (!self->mNumFreeBuffers) {
219215
self->mCondition.wait(self->mutex);
@@ -224,7 +220,6 @@ int FramebufferNativeWindow::dequeueBuffer(ANativeWindow* window,
224220

225221
*buffer = self->buffers[index].get();
226222

227-
logger.log(GraphicLog::SF_FB_DEQUEUE_AFTER, index);
228223
return 0;
229224
}
230225

@@ -235,16 +230,12 @@ int FramebufferNativeWindow::lockBuffer(ANativeWindow* window,
235230
Mutex::Autolock _l(self->mutex);
236231

237232
const int index = self->mCurrentBufferIndex;
238-
GraphicLog& logger(GraphicLog::getInstance());
239-
logger.log(GraphicLog::SF_FB_LOCK_BEFORE, index);
240233

241234
// wait that the buffer we're locking is not front anymore
242235
while (self->front == buffer) {
243236
self->mCondition.wait(self->mutex);
244237
}
245238

246-
logger.log(GraphicLog::SF_FB_LOCK_AFTER, index);
247-
248239
return NO_ERROR;
249240
}
250241

@@ -257,13 +248,7 @@ int FramebufferNativeWindow::queueBuffer(ANativeWindow* window,
257248
buffer_handle_t handle = static_cast<NativeBuffer*>(buffer)->handle;
258249

259250
const int index = self->mCurrentBufferIndex;
260-
GraphicLog& logger(GraphicLog::getInstance());
261-
logger.log(GraphicLog::SF_FB_POST_BEFORE, index);
262-
263251
int res = fb->post(fb, handle);
264-
265-
logger.log(GraphicLog::SF_FB_POST_AFTER, index);
266-
267252
self->front = static_cast<NativeBuffer*>(buffer);
268253
self->mNumFreeBuffers++;
269254
self->mCondition.broadcast();

libs/ui/GraphicLog.cpp

Lines changed: 0 additions & 92 deletions
This file was deleted.

services/surfaceflinger/DisplayHardware/DisplayHardware.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,6 @@ status_t DisplayHardware::compositionComplete() const {
384384
return mNativeWindow->compositionComplete();
385385
}
386386

387-
int DisplayHardware::getCurrentBufferIndex() const {
388-
return mNativeWindow->getCurrentBufferIndex();
389-
}
390-
391387
void DisplayHardware::flip(const Region& dirty) const
392388
{
393389
checkGLErrors();

services/surfaceflinger/DisplayHardware/DisplayHardware.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@ class DisplayHardware : public DisplayHardwareBase
9393
}
9494
inline Rect bounds() const { return getBounds(); }
9595

96-
// only for debugging
97-
int getCurrentBufferIndex() const;
98-
9996
private:
10097
void init(uint32_t displayIndex) __attribute__((noinline));
10198
void fini() __attribute__((noinline));

services/surfaceflinger/SurfaceFlinger.cpp

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include <utils/StopWatch.h>
4242

4343
#include <ui/GraphicBufferAllocator.h>
44-
#include <ui/GraphicLog.h>
4544
#include <ui/PixelFormat.h>
4645

4746
#include <pixelflinger/pixelflinger.h>
@@ -431,21 +430,10 @@ bool SurfaceFlinger::threadLoop()
431430
const DisplayHardware& hw(graphicPlane(0).displayHardware());
432431
if (CC_LIKELY(hw.canDraw())) {
433432
// repaint the framebuffer (if needed)
434-
435-
const int index = hw.getCurrentBufferIndex();
436-
GraphicLog& logger(GraphicLog::getInstance());
437-
438-
logger.log(GraphicLog::SF_REPAINT, index);
439433
handleRepaint();
440-
441434
// inform the h/w that we're done compositing
442-
logger.log(GraphicLog::SF_COMPOSITION_COMPLETE, index);
443435
hw.compositionComplete();
444-
445-
logger.log(GraphicLog::SF_SWAP_BUFFERS, index);
446436
postFramebuffer();
447-
448-
logger.log(GraphicLog::SF_REPAINT_DONE, index);
449437
} else {
450438
// pretend we did the post
451439
hw.compositionComplete();
@@ -1097,23 +1085,6 @@ void SurfaceFlinger::drawWormhole() const
10971085
}
10981086
}
10991087

1100-
void SurfaceFlinger::debugShowFPS() const
1101-
{
1102-
static int mFrameCount;
1103-
static int mLastFrameCount = 0;
1104-
static nsecs_t mLastFpsTime = 0;
1105-
static float mFps = 0;
1106-
mFrameCount++;
1107-
nsecs_t now = systemTime();
1108-
nsecs_t diff = now - mLastFpsTime;
1109-
if (diff > ms2ns(250)) {
1110-
mFps = ((mFrameCount - mLastFrameCount) * float(s2ns(1))) / diff;
1111-
mLastFpsTime = now;
1112-
mLastFrameCount = mFrameCount;
1113-
}
1114-
// XXX: mFPS has the value we want
1115-
}
1116-
11171088
status_t SurfaceFlinger::addLayer(const sp<LayerBase>& layer)
11181089
{
11191090
Mutex::Autolock _l(mStateLock);
@@ -1707,11 +1678,6 @@ status_t SurfaceFlinger::onTransact(
17071678
setTransactionFlags(eTransactionNeeded|eTraversalNeeded);
17081679
return NO_ERROR;
17091680
}
1710-
case 1006:{ // enable/disable GraphicLog
1711-
int enabled = data.readInt32();
1712-
GraphicLog::getInstance().setEnabled(enabled);
1713-
return NO_ERROR;
1714-
}
17151681
case 1008: // toggle use of hw composer
17161682
n = data.readInt32();
17171683
mDebugDisableHWC = n ? 1 : 0;

services/surfaceflinger/SurfaceFlinger.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ class SurfaceFlinger :
335335
status_t electronBeamOnAnimationImplLocked();
336336

337337
void debugFlashRegions();
338-
void debugShowFPS() const;
339338
void drawWormhole() const;
340339

341340

0 commit comments

Comments
 (0)