Merge "surfaceflinger: give hwcomposer a chance to release buffers"
This commit is contained in:
@@ -292,6 +292,9 @@ void DisplayHardware::fini()
|
||||
void DisplayHardware::releaseScreen() const
|
||||
{
|
||||
DisplayHardwareBase::releaseScreen();
|
||||
if (mHwc->initCheck() == NO_ERROR) {
|
||||
mHwc->release();
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayHardware::acquireScreen() const
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user