Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java

Issue 1021863005: Pass format as argument to getContentBitmapAsync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add config parameter tp function header. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java b/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java
index ded0664c6296157b5f02f2260aacb8c15a4f64f0..a84e44fd3042853bbdd60a0d0341c98d04975ab9 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java
@@ -78,10 +78,11 @@ public abstract class ContentReadbackHandler {
* @param srcRect A subrect of the original content to capture. If this is empty, it will grab
* the whole surface.
* @param view The {@link ContentViewCore} to grab the bitmap from.
+ * @param config The output content bitmap configuration.
* @param callback The callback to be executed after readback completes.
*/
public void getContentBitmapAsync(float scale, Rect srcRect, ContentViewCore view,
- GetBitmapCallback callback) {
+ Bitmap.Config config, GetBitmapCallback callback) {
if (!readyForReadback()) {
callback.onFinishGetBitmap(null);
return;
@@ -91,7 +92,7 @@ public abstract class ContentReadbackHandler {
int readbackId = mNextReadbackId++;
mGetBitmapRequests.put(readbackId, callback);
nativeGetContentBitmap(mNativeContentReadbackHandler, readbackId, scale,
- Bitmap.Config.ARGB_8888, srcRect.top, srcRect.left, srcRect.width(),
+ config, srcRect.top, srcRect.left, srcRect.width(),
srcRect.height(), view);
}

Powered by Google App Engine
This is Rietveld 408576698