summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 22:51:32 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 22:51:32 +0000
commit501e219bad8007e4a0e399da91411f3faf993f4d (patch)
tree4b14dccac5308f19a3c6793c7506b113b73a04af
parent198beb13debf65d23f37c28768e723fa520d30cf (diff)
downloadchromium_src-501e219bad8007e4a0e399da91411f3faf993f4d.zip
chromium_src-501e219bad8007e4a0e399da91411f3faf993f4d.tar.gz
chromium_src-501e219bad8007e4a0e399da91411f3faf993f4d.tar.bz2
Make ContentViewRenderView::CompositeToBitmap not CompositeAndReadback.
The CompositeAndReadback is going away, and this method is thought to be unused. Make the method just fail and return false. R=aelias, tedchoc@chromium.org BUG=371592 Review URL: https://codereview.chromium.org/270933002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269448 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/android/content_view_render_view.cc9
-rw-r--r--content/browser/android/content_view_render_view.h1
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java14
3 files changed, 1 insertions, 23 deletions
diff --git a/content/browser/android/content_view_render_view.cc b/content/browser/android/content_view_render_view.cc
index 9f5ed31..efda29d 100644
--- a/content/browser/android/content_view_render_view.cc
+++ b/content/browser/android/content_view_render_view.cc
@@ -127,15 +127,6 @@ jboolean ContentViewRenderView::Composite(JNIEnv* env, jobject obj) {
return buffers_swapped_during_composite_;
}
-jboolean ContentViewRenderView::CompositeToBitmap(JNIEnv* env, jobject obj,
- jobject java_bitmap) {
- gfx::JavaBitmap bitmap(java_bitmap);
- if (!compositor_ || bitmap.format() != ANDROID_BITMAP_FORMAT_RGBA_8888)
- return false;
- return compositor_->CompositeAndReadback(bitmap.pixels(),
- gfx::Rect(bitmap.size()));
-}
-
void ContentViewRenderView::SetOverlayVideoMode(
JNIEnv* env, jobject obj, bool enabled) {
compositor_->SetHasTransparentBackground(enabled);
diff --git a/content/browser/android/content_view_render_view.h b/content/browser/android/content_view_render_view.h
index 8f14456..21e79ea 100644
--- a/content/browser/android/content_view_render_view.h
+++ b/content/browser/android/content_view_render_view.h
@@ -40,7 +40,6 @@ class ContentViewRenderView : public CompositorClient {
void SurfaceChanged(JNIEnv* env, jobject obj,
jint format, jint width, jint height, jobject surface);
jboolean Composite(JNIEnv* env, jobject obj);
- jboolean CompositeToBitmap(JNIEnv* env, jobject obj, jobject java_bitmap);
void SetOverlayVideoMode(JNIEnv* env, jobject obj, bool enabled);
// CompositorClient ---------------------------------------------------------
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
index 6c11209..11c2379 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
@@ -186,18 +186,7 @@ public class ContentViewRenderView extends FrameLayout implements WindowAndroid.
* @return The created SurfaceView object.
*/
protected SurfaceView createSurfaceView(Context context) {
- return new SurfaceView(context) {
- @Override
- public void onDraw(Canvas canvas) {
- // We only need to draw to software canvases, which are used for taking screenshots.
- if (canvas.isHardwareAccelerated()) return;
- Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(),
- Bitmap.Config.ARGB_8888);
- if (nativeCompositeToBitmap(mNativeContentViewRenderView, bitmap)) {
- canvas.drawBitmap(bitmap, 0, 0, null);
- }
- }
- };
+ return new SurfaceView(context);
}
/**
@@ -288,7 +277,6 @@ public class ContentViewRenderView extends FrameLayout implements WindowAndroid.
private native void nativeSurfaceChanged(long nativeContentViewRenderView,
int format, int width, int height, Surface surface);
private native boolean nativeComposite(long nativeContentViewRenderView);
- private native boolean nativeCompositeToBitmap(long nativeContentViewRenderView, Bitmap bitmap);
private native void nativeSetOverlayVideoMode(long nativeContentViewRenderView,
boolean enabled);
}