Merge "surfaceflinger: give hwcomposer a chance to release buffers"

This commit is contained in:
Erik Gilling
2010-09-09 13:01:27 -07:00
committed by Android (Google) Code Review
3 changed files with 10 additions and 0 deletions

View File

@@ -292,6 +292,9 @@ void DisplayHardware::fini()
void DisplayHardware::releaseScreen() const
{
DisplayHardwareBase::releaseScreen();
if (mHwc->initCheck() == NO_ERROR) {
mHwc->release();
}
}
void DisplayHardware::acquireScreen() const

View File

@@ -87,6 +87,11 @@ status_t HWComposer::commit() const {
return (status_t)err;
}
status_t HWComposer::release() const {
int err = mHwc->set(mHwc, NULL, NULL, NULL);
return (status_t)err;
}
size_t HWComposer::getNumLayers() const {
return mList ? mList->numHwLayers : 0;
}

View File

@@ -48,6 +48,8 @@ public:
// commits the list
status_t commit() const;
// release hardware resources
status_t release() const;
size_t getNumLayers() const;
hwc_layer_t* getLayers() const;