| Index: media/gpu/android_copying_backing_strategy.cc
|
| diff --git a/media/gpu/android_copying_backing_strategy.cc b/media/gpu/android_copying_backing_strategy.cc
|
| index 6aa8b6794dbe24f4a1ac3be4e30a9c3edeef7119..d18b640a16819c728d14b439a8f106ca9d4190ad 100644
|
| --- a/media/gpu/android_copying_backing_strategy.cc
|
| +++ b/media/gpu/android_copying_backing_strategy.cc
|
| @@ -34,23 +34,8 @@ gfx::ScopedJavaSurface AndroidCopyingBackingStrategy::Initialize(
|
| return gfx::ScopedJavaSurface();
|
| }
|
|
|
| - // Create a texture and attach the SurfaceTexture to it.
|
| - glGenTextures(1, &surface_texture_id_);
|
| - glActiveTexture(GL_TEXTURE0);
|
| - glBindTexture(GL_TEXTURE_EXTERNAL_OES, surface_texture_id_);
|
| -
|
| - // Note that the target will be correctly sized, so nearest filtering is all
|
| - // that's needed.
|
| - glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| - glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| - glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
| - glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| -
|
| - state_provider_->GetGlDecoder()->RestoreTextureUnitBindings(0);
|
| - state_provider_->GetGlDecoder()->RestoreActiveTexture();
|
| -
|
| - surface_texture_ = gfx::SurfaceTexture::Create(surface_texture_id_);
|
| -
|
| + surface_texture_ =
|
| + state_provider_->CreateAttachedSurfaceTexture(&surface_texture_id_);
|
| return gfx::ScopedJavaSurface(surface_texture_.get());
|
| }
|
|
|
|
|