diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h index a59d9e529..3923e61ad 100644 --- a/include/surfaceflinger/Surface.h +++ b/include/surfaceflinger/Surface.h @@ -102,10 +102,6 @@ private: friend class Test; // videoEditor preview classes friend class VideoEditorPreviewController; - - const sp& getISurface() const { return mSurface; } - - friend class Surface; SurfaceControl( @@ -169,6 +165,7 @@ public: // setSwapRectangle() is intended to be used by GL ES clients void setSwapRectangle(const Rect& r); + sp asBinder() const; private: /* @@ -242,7 +239,6 @@ private: */ void init(); status_t validate(bool inCancelBuffer = false) const; - sp getISurface() const; // When the buffer pool is a fixed size we want to make sure SurfaceFlinger // won't stall clients, so we require an extra buffer. diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp index 0dfbf01aa..44d9b4b4d 100644 --- a/libs/gui/Surface.cpp +++ b/libs/gui/Surface.cpp @@ -502,8 +502,8 @@ status_t Surface::validate(bool inCancelBuffer) const return NO_ERROR; } -sp Surface::getISurface() const { - return mSurface; +sp Surface::asBinder() const { + return mSurface!=0 ? mSurface->asBinder() : 0; } // ---------------------------------------------------------------------------- diff --git a/services/surfaceflinger/tests/resize/resize.cpp b/services/surfaceflinger/tests/resize/resize.cpp index 0ccca77dd..18c54b3f8 100644 --- a/services/surfaceflinger/tests/resize/resize.cpp +++ b/services/surfaceflinger/tests/resize/resize.cpp @@ -29,13 +29,6 @@ using namespace android; namespace android { -class Test { -public: - static const sp& getISurface(const sp& s) { - return s->getISurface(); - } -}; -}; int main(int argc, char** argv) {