summaryrefslogtreecommitdiffstats
path: root/WebKit/android/plugins
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2010-05-03 15:26:15 -0400
committerDerek Sollenberger <djsollen@google.com>2010-05-03 15:26:15 -0400
commitd294ab9957512fd5554d794194d26328840125b4 (patch)
tree4d4324c9f74bbe312d7882b5925e6399ad879fa1 /WebKit/android/plugins
parent5076efcd053da090680d27026645b6a7d26ca79b (diff)
downloadexternal_webkit-d294ab9957512fd5554d794194d26328840125b4.zip
external_webkit-d294ab9957512fd5554d794194d26328840125b4.tar.gz
external_webkit-d294ab9957512fd5554d794194d26328840125b4.tar.bz2
Update plugin's dirtyRect to match the dirtyRect returned when locking a surface.
Change-Id: I2c3e6daa10eb9eb651be52bf9387008f154b176d http://b/2650954
Diffstat (limited to 'WebKit/android/plugins')
-rw-r--r--WebKit/android/plugins/ANPSurfaceInterface.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/WebKit/android/plugins/ANPSurfaceInterface.cpp b/WebKit/android/plugins/ANPSurfaceInterface.cpp
index cb32ed5..8830191 100644
--- a/WebKit/android/plugins/ANPSurfaceInterface.cpp
+++ b/WebKit/android/plugins/ANPSurfaceInterface.cpp
@@ -118,6 +118,16 @@ static bool anp_lock(JNIEnv* env, jobject surfaceView, ANPBitmap* bitmap, ANPRec
return false;
}
+ // the surface may have expanded the dirty region so we must to pass that
+ // information back to the plugin.
+ if (dirtyRect) {
+ Rect dirtyBounds = dirtyRegion.getBounds();
+ dirtyRect->left = dirtyBounds.left;
+ dirtyRect->right = dirtyBounds.right;
+ dirtyRect->top = dirtyBounds.top;
+ dirtyRect->bottom = dirtyBounds.bottom;
+ }
+
ssize_t bpr = info.s * bytesPerPixel(info.format);
bitmap->format = convertPixelFormat(info.format);