diff options
author | Mathias Agopian <mathias@google.com> | 2011-07-14 14:45:08 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-07-14 14:45:08 -0700 |
commit | f70947fcd251dffbbf29414cf43bea971d9df3e8 (patch) | |
tree | e9d4e54642f925d0f74a8b2547f1a7fac8de8c1d | |
parent | 334655795fb9b23eb8d011c6f7ccf807816f74f0 (diff) | |
download | frameworks_av-f70947fcd251dffbbf29414cf43bea971d9df3e8.zip frameworks_av-f70947fcd251dffbbf29414cf43bea971d9df3e8.tar.gz frameworks_av-f70947fcd251dffbbf29414cf43bea971d9df3e8.tar.bz2 |
Use the ANativeWindow APIs instead of the Surface APIs
Surface inherits from ANativeWindow, the APIs on the later
are the only public APIs.
Change-Id: Ibddebfe535e026d872cc13287a102660c004385f
-rwxr-xr-x | libvideoeditor/lvpp/PreviewRenderer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libvideoeditor/lvpp/PreviewRenderer.cpp b/libvideoeditor/lvpp/PreviewRenderer.cpp index 9919ee9..36fc969 100755 --- a/libvideoeditor/lvpp/PreviewRenderer.cpp +++ b/libvideoeditor/lvpp/PreviewRenderer.cpp @@ -151,12 +151,12 @@ void PreviewRenderer::getBufferYV12(uint8_t **data, size_t *stride) { int err = OK; LOGV("getBuffer START"); - if ((err = mSurface->dequeueBuffer(mSurface.get(), &mBuf)) != 0) { + if ((err = mSurface->ANativeWindow::dequeueBuffer(mSurface.get(), &mBuf)) != 0) { LOGW("Surface::dequeueBuffer returned error %d", err); return; } - CHECK_EQ(0, mSurface->lockBuffer(mSurface.get(), mBuf)); + CHECK_EQ(0, mSurface->ANativeWindow::lockBuffer(mSurface.get(), mBuf)); GraphicBufferMapper &mapper = GraphicBufferMapper::get(); @@ -188,7 +188,7 @@ void PreviewRenderer::renderYV12() { if (mBuf!= NULL) { CHECK_EQ(0, mapper.unlock(mBuf->handle)); - if ((err = mSurface->queueBuffer(mSurface.get(), mBuf)) != 0) { + if ((err = mSurface->ANativeWindow::queueBuffer(mSurface.get(), mBuf)) != 0) { LOGW("Surface::queueBuffer returned error %d", err); } } @@ -209,12 +209,12 @@ void PreviewRenderer::render( ANativeWindowBuffer *buf; int err; - if ((err = mSurface->dequeueBuffer(mSurface.get(), &buf)) != 0) { + if ((err = mSurface->ANativeWindow::dequeueBuffer(mSurface.get(), &buf)) != 0) { LOGW("Surface::dequeueBuffer returned error %d", err); return; } - CHECK_EQ(0, mSurface->lockBuffer(mSurface.get(), buf)); + CHECK_EQ(0, mSurface->ANativeWindow::lockBuffer(mSurface.get(), buf)); GraphicBufferMapper &mapper = GraphicBufferMapper::get(); @@ -284,7 +284,7 @@ void PreviewRenderer::render( CHECK_EQ(0, mapper.unlock(buf->handle)); - if ((err = mSurface->queueBuffer(mSurface.get(), buf)) != 0) { + if ((err = mSurface->ANativeWindow::queueBuffer(mSurface.get(), buf)) != 0) { LOGW("Surface::queueBuffer returned error %d", err); } buf = NULL; |