Commit c5ab4c1a authored by Khushal's avatar Khushal Committed by Commit Bot

Reland "Re-enable AImageReader on ARM GPUs."

This reverts commit d2d106df.

This patch had a side-effect of enabling SurfaceControl on cast
devices which had a bug in how the Surface was initialized for
use in the GPU process.

R=shaktisahu@chromium.org,boliu@chromium.org
TBR=zmo@chromium.org

Bug: 1021797
Change-Id: I9ff4e19253260debe7369e1267c23725385555bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1915288Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Auto-Submit: Khushal <khushalsagar@chromium.org>
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715354}
parent 3323f2d6
......@@ -81,11 +81,12 @@ void CompositorViewImpl::SurfaceChanged(JNIEnv* env,
jint format,
jint width,
jint height,
bool can_be_used_with_surface_control,
const JavaParamRef<jobject>& surface) {
DCHECK(surface);
if (current_surface_format_ != format) {
current_surface_format_ = format;
compositor_->SetSurface(surface, false);
compositor_->SetSurface(surface, can_be_used_with_surface_control);
}
gfx::Size content_size(width, height);
......
......@@ -51,6 +51,7 @@ class CompositorViewImpl : public CompositorView,
jint format,
jint width,
jint height,
bool can_be_used_with_surface_control,
const base::android::JavaParamRef<jobject>& surface);
// CompositorView implementation.
......
......@@ -81,7 +81,8 @@ public class CompositorViewImpl implements CompositorView {
SurfaceHolder surfaceHolder, int format, int width, int height) {
if (mNativeCompositorViewImpl == 0) return;
CompositorViewImplJni.get().surfaceChanged(mNativeCompositorViewImpl,
CompositorViewImpl.this, format, width, height, surfaceHolder.getSurface());
CompositorViewImpl.this, format, width, height, true,
surfaceHolder.getSurface());
}
@Override
......@@ -106,7 +107,7 @@ public class CompositorViewImpl implements CompositorView {
SurfaceTexture surfaceTexture, int width, int height) {
if (mNativeCompositorViewImpl == 0) return;
CompositorViewImplJni.get().surfaceChanged(mNativeCompositorViewImpl,
CompositorViewImpl.this, PixelFormat.OPAQUE, width, height,
CompositorViewImpl.this, PixelFormat.OPAQUE, width, height, false,
new Surface(surfaceTexture));
}
......@@ -125,7 +126,7 @@ public class CompositorViewImpl implements CompositorView {
CompositorViewImplJni.get().surfaceCreated(
mNativeCompositorViewImpl, CompositorViewImpl.this);
CompositorViewImplJni.get().surfaceChanged(mNativeCompositorViewImpl,
CompositorViewImpl.this, PixelFormat.OPAQUE, width, height,
CompositorViewImpl.this, PixelFormat.OPAQUE, width, height, false,
new Surface(surfaceTexture));
}
});
......@@ -157,7 +158,7 @@ public class CompositorViewImpl implements CompositorView {
void surfaceCreated(long nativeCompositorViewImpl, CompositorViewImpl caller);
void surfaceDestroyed(long nativeCompositorViewImpl, CompositorViewImpl caller);
void surfaceChanged(long nativeCompositorViewImpl, CompositorViewImpl caller, int format,
int width, int height, Surface surface);
int width, int height, boolean canBeUsedWithSurfaceControl, Surface surface);
void setNeedsComposite(long nativeCompositorViewImpl, CompositorViewImpl caller);
}
}
......@@ -98,7 +98,8 @@ void ContentViewRenderView::SurfaceChanged(
const JavaParamRef<jobject>& surface) {
if (current_surface_format_ != format) {
current_surface_format_ = format;
compositor_->SetSurface(surface, false /* backed_by_surface_texture */);
compositor_->SetSurface(surface,
true /* can_be_used_with_surface_control */);
}
compositor_->SetWindowBounds(gfx::Size(width, height));
}
......
......@@ -2887,18 +2887,6 @@
"reset_base_mipmap_level_before_texstorage"
]
},
{
"id":275,
"cr_bugs": [838725],
"description": "Disable AImageReader on ARM GPUs as its buggy.",
"os": {
"type": "android"
},
"gl_vendor": "ARM.*",
"features": [
"disable_aimagereader"
]
},
{
"id": 277,
"description": "Direct composition path is buggy on certain AMD devices/drivers",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment