summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-02-15 16:18:55 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-02-15 16:18:55 -0800
commit397fd86f55a16ca7d05a32f2372b77d35478915b (patch)
treeeb682c7295ed7d0ae6b65928a410ba463007674c
parent4e40a24c68d617858617546dd474407cf70a509c (diff)
parentfcc2b346069b347a4a2fc2615c548ad5f01808c0 (diff)
downloadwebkit-397fd86f55a16ca7d05a32f2372b77d35478915b.tar.gz
am fcc2b346: fix build: SurfaceTextureClient to Surface rename
* commit 'fcc2b346069b347a4a2fc2615c548ad5f01808c0': fix build: SurfaceTextureClient to Surface rename
-rw-r--r--Source/WebKit/android/plugins/ANPSurfaceInterface.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/WebKit/android/plugins/ANPSurfaceInterface.cpp b/Source/WebKit/android/plugins/ANPSurfaceInterface.cpp
index 209fb4879..1b699de11 100644
--- a/Source/WebKit/android/plugins/ANPSurfaceInterface.cpp
+++ b/Source/WebKit/android/plugins/ANPSurfaceInterface.cpp
@@ -107,14 +107,17 @@ static bool anp_lock(JNIEnv* env, jobject surfaceView, ANPBitmap* bitmap, ANPRec
dirtyRegion.set(Rect(0x3FFF, 0x3FFF));
}
- android::Surface::SurfaceInfo info;
- status_t err = surface->lock(&info, &dirtyRegion);
+
+ ANativeWindow_Buffer outBuffer;
+ Rect dirtyBounds(dirtyRegion.getBounds());
+ status_t err = surface->lock(&outBuffer, &dirtyBounds);
if (err < 0) {
return false;
}
// the surface may have expanded the dirty region so we must to pass that
// information back to the plugin.
+ dirtyRegion.set(dirtyBounds);
if (dirtyRect) {
Rect dirtyBounds = dirtyRegion.getBounds();
dirtyRect->left = dirtyBounds.left;
@@ -123,15 +126,15 @@ static bool anp_lock(JNIEnv* env, jobject surfaceView, ANPBitmap* bitmap, ANPRec
dirtyRect->bottom = dirtyBounds.bottom;
}
- ssize_t bpr = info.s * bytesPerPixel(info.format);
+ ssize_t bpr = outBuffer.stride * bytesPerPixel(outBuffer.format);
- bitmap->format = convertPixelFormat(info.format);
- bitmap->width = info.w;
- bitmap->height = info.h;
+ bitmap->format = convertPixelFormat(outBuffer.format);
+ bitmap->width = outBuffer.width;
+ bitmap->height = outBuffer.height;
bitmap->rowBytes = bpr;
- if (info.w > 0 && info.h > 0) {
- bitmap->baseAddr = info.bits;
+ if (outBuffer.width > 0 && outBuffer.height > 0) {
+ bitmap->baseAddr = outBuffer.bits;
} else {
bitmap->baseAddr = NULL;
return false;