Commit 2ea9fd51 authored by Greg Daniel's avatar Greg Daniel Committed by Commit Bot

Move SkImage::getTextureHandle to getBackendTexture in media calls.

In skia, getTextureHandle is deprecated and this change moves to using the
new API.

Change-Id: I69b507744e21187cfa9da74a960e5394acb2b524
Reviewed-on: https://chromium-review.googlesource.com/1024370Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553170}
parent 63b09b69
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "gpu/command_buffer/common/mailbox_holder.h" #include "gpu/command_buffer/common/mailbox_holder.h"
#include "media/base/data_buffer.h" #include "media/base/data_buffer.h"
#include "media/base/video_frame.h" #include "media/base/video_frame.h"
#include "skia/ext/texture_handle.h"
#include "third_party/libyuv/include/libyuv.h" #include "third_party/libyuv/include/libyuv.h"
#include "third_party/skia/include/core/SkImage.h" #include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkImageGenerator.h" #include "third_party/skia/include/core/SkImageGenerator.h"
...@@ -898,18 +897,19 @@ bool PaintCanvasVideoRenderer::CopyVideoFrameTexturesToGLTexture( ...@@ -898,18 +897,19 @@ bool PaintCanvasVideoRenderer::CopyVideoFrameTexturesToGLTexture(
if (!UpdateLastImage(video_frame, context_3d)) if (!UpdateLastImage(video_frame, context_3d))
return false; return false;
const GrGLTextureInfo* texture_info = GrBackendTexture backend_texture =
skia::GrBackendObjectToGrGLTextureInfo( last_image_.GetSkImage()->getBackendTexture(true);
last_image_.GetSkImage()->getTextureHandle(true)); if (!backend_texture.isValid())
return false;
if (!texture_info) GrGLTextureInfo texture_info;
if (!backend_texture.getGLTextureInfo(&texture_info))
return false; return false;
gpu::gles2::GLES2Interface* canvas_gl = context_3d.gl; gpu::gles2::GLES2Interface* canvas_gl = context_3d.gl;
gpu::MailboxHolder mailbox_holder; gpu::MailboxHolder mailbox_holder;
mailbox_holder.texture_target = texture_info->fTarget; mailbox_holder.texture_target = texture_info.fTarget;
canvas_gl->GenMailboxCHROMIUM(mailbox_holder.mailbox.name); canvas_gl->GenMailboxCHROMIUM(mailbox_holder.mailbox.name);
canvas_gl->ProduceTextureDirectCHROMIUM(texture_info->fID, canvas_gl->ProduceTextureDirectCHROMIUM(texture_info.fID,
mailbox_holder.mailbox.name); mailbox_holder.mailbox.name);
// Wait for mailbox creation on canvas context before consuming it and // Wait for mailbox creation on canvas context before consuming it and
...@@ -1028,7 +1028,7 @@ bool PaintCanvasVideoRenderer::UpdateLastImage( ...@@ -1028,7 +1028,7 @@ bool PaintCanvasVideoRenderer::UpdateLastImage(
const scoped_refptr<VideoFrame>& video_frame, const scoped_refptr<VideoFrame>& video_frame,
const Context3D& context_3d) { const Context3D& context_3d) {
if (!last_image_ || video_frame->timestamp() != last_timestamp_ || if (!last_image_ || video_frame->timestamp() != last_timestamp_ ||
!last_image_.GetSkImage()->getTextureHandle(true)) { !last_image_.GetSkImage()->getBackendTexture(true).isValid()) {
ResetCache(); ResetCache();
auto paint_image_builder = auto paint_image_builder =
......
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