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

Unified Diff: media/renderers/skcanvas_video_renderer.cc

Issue 2639973002: Add target argument to Copy{Sub}TextureCHROMIUM entry point (Closed)
Patch Set: use dest_target instead of target Created 3 years, 11 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: media/renderers/skcanvas_video_renderer.cc
diff --git a/media/renderers/skcanvas_video_renderer.cc b/media/renderers/skcanvas_video_renderer.cc
index a7bf80f694ad3ca97ed42d832a17f0ee401bc9fd..5fc009354c490c2a8d1fa8e9995cea02c58cc15f 100644
--- a/media/renderers/skcanvas_video_renderer.cc
+++ b/media/renderers/skcanvas_video_renderer.cc
@@ -120,8 +120,9 @@ sk_sp<SkImage> NewSkImageFromVideoFrameYUVTextures(
gl->GenTextures(1, &texture_copy);
DCHECK(texture_copy);
gl->BindTexture(GL_TEXTURE_2D, texture_copy);
- gl->CopyTextureCHROMIUM(source_textures[i].fID, 0, texture_copy, 0,
- GL_RGB, GL_UNSIGNED_BYTE, false, true, false);
+ gl->CopyTextureCHROMIUM(source_textures[i].fID, 0, GL_TEXTURE_2D,
+ texture_copy, 0, GL_RGB, GL_UNSIGNED_BYTE, false,
+ true, false);
gl->DeleteTextures(1, &source_textures[i].fID);
source_textures[i].fID = texture_copy;
@@ -783,8 +784,8 @@ void SkCanvasVideoRenderer::CopyVideoFrameSingleTextureToGLTexture(
// Make sure to only copy the natural size to avoid putting garbage
// into the bottom of the destination texture.
const gfx::Size& natural_size = video_frame->natural_size();
- gl->CopySubTextureCHROMIUM(source_texture, 0, texture, 0, 0, 0, 0, 0,
- natural_size.width(), natural_size.height(),
+ gl->CopySubTextureCHROMIUM(source_texture, 0, GL_TEXTURE_2D, texture, 0, 0, 0,
+ 0, 0, natural_size.width(), natural_size.height(),
flip_y, premultiply_alpha, false);
gl->DeleteTextures(1, &source_texture);
gl->Flush();
@@ -840,8 +841,9 @@ bool SkCanvasVideoRenderer::CopyVideoFrameTexturesToGLTexture(
// into the bottom of the destination texture.
const gfx::Size& natural_size = video_frame->natural_size();
destination_gl->CopySubTextureCHROMIUM(
- intermediate_texture, 0, texture, 0, 0, 0, 0, 0, natural_size.width(),
- natural_size.height(), flip_y, premultiply_alpha, false);
+ intermediate_texture, 0, GL_TEXTURE_2D, texture, 0, 0, 0, 0, 0,
+ natural_size.width(), natural_size.height(), flip_y, premultiply_alpha,
+ false);
destination_gl->DeleteTextures(1, &intermediate_texture);
// Wait for destination context to consume mailbox before deleting it in

Powered by Google App Engine
This is Rietveld 408576698