diff options
Diffstat (limited to 'services/surfaceflinger/MonitoredProducer.cpp')
-rw-r--r-- | services/surfaceflinger/MonitoredProducer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/services/surfaceflinger/MonitoredProducer.cpp b/services/surfaceflinger/MonitoredProducer.cpp index 8fed676..cd3fdf1 100644 --- a/services/surfaceflinger/MonitoredProducer.cpp +++ b/services/surfaceflinger/MonitoredProducer.cpp @@ -20,7 +20,7 @@ namespace android { -MonitoredProducer::MonitoredProducer(const sp<BnGraphicBufferProducer>& producer, +MonitoredProducer::MonitoredProducer(const sp<IGraphicBufferProducer>& producer, const sp<SurfaceFlinger>& flinger) : mProducer(producer), mFlinger(flinger) {} @@ -49,8 +49,7 @@ MonitoredProducer::~MonitoredProducer() { wp<IBinder> mProducer; }; - mFlinger->postMessageAsync(new MessageCleanUpList(mFlinger, - static_cast<BnGraphicBufferProducer*>(this))); + mFlinger->postMessageAsync(new MessageCleanUpList(mFlinger, asBinder())); } status_t MonitoredProducer::requestBuffer(int slot, sp<GraphicBuffer>* buf) { @@ -101,5 +100,9 @@ status_t MonitoredProducer::setSidebandStream(const sp<NativeHandle>& stream) { return mProducer->setSidebandStream(stream); } +IBinder* MonitoredProducer::onAsBinder() { + return mProducer->asBinder().get(); +} + // --------------------------------------------------------------------------- }; // namespace android |