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

Side by Side Diff: content/common/gpu/media/android_deferred_rendering_backing_strategy.cc

Issue 1401423003: Re-land: ui: Move GLImage::BindTexImage fallback from GLImage implementations to GLES2CmdDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix stream texture issue Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/media/android_deferred_rendering_backing_strategy.h " 5 #include "content/common/gpu/media/android_deferred_rendering_backing_strategy.h "
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Also set the parameters for the level if we're not clearing 103 // Also set the parameters for the level if we're not clearing
104 // the image. 104 // the image.
105 const gfx::Size size = state_provider_->GetSize(); 105 const gfx::Size size = state_provider_->GetSize();
106 texture_manager->SetTarget(texture_ref, GetTextureTarget()); 106 texture_manager->SetTarget(texture_ref, GetTextureTarget());
107 texture_manager->SetLevelInfo(texture_ref, GetTextureTarget(), 0, GL_RGBA, 107 texture_manager->SetLevelInfo(texture_ref, GetTextureTarget(), 0, GL_RGBA,
108 size.width(), size.height(), 1, 0, GL_RGBA, 108 size.width(), size.height(), 1, 0, GL_RGBA,
109 GL_UNSIGNED_BYTE, gfx::Rect(size)); 109 GL_UNSIGNED_BYTE, gfx::Rect(size));
110 } 110 }
111 111
112 texture_manager->SetLevelImage(texture_ref, GetTextureTarget(), 0, 112 texture_manager->SetLevelImage(texture_ref, GetTextureTarget(), 0,
113 image.get()); 113 image.get(), gpu::gles2::Texture::UNBOUND);
114 } 114 }
115 115
116 void AndroidDeferredRenderingBackingStrategy::UseCodecBufferForPictureBuffer( 116 void AndroidDeferredRenderingBackingStrategy::UseCodecBufferForPictureBuffer(
117 int32 codec_buf_index, 117 int32 codec_buf_index,
118 const media::PictureBuffer& picture_buffer) { 118 const media::PictureBuffer& picture_buffer) {
119 // Make sure that the decoder is available. 119 // Make sure that the decoder is available.
120 RETURN_IF_NULL(state_provider_->GetGlDecoder()); 120 RETURN_IF_NULL(state_provider_->GetGlDecoder());
121 121
122 // Notify the AVDACodecImage for picture_buffer that it should use the 122 // Notify the AVDACodecImage for picture_buffer that it should use the
123 // decoded buffer codec_buf_index to render this frame. 123 // decoded buffer codec_buf_index to render this frame.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // doesn't know about them. 185 // doesn't know about them.
186 media_codec_ = codec; 186 media_codec_ = codec;
187 for (const std::pair<int, media::PictureBuffer>& entry : buffers) { 187 for (const std::pair<int, media::PictureBuffer>& entry : buffers) {
188 AVDACodecImage* avImage = GetImageForPicture(entry.second); 188 AVDACodecImage* avImage = GetImageForPicture(entry.second);
189 avImage->SetMediaCodec(codec); 189 avImage->SetMediaCodec(codec);
190 avImage->SetMediaCodecBufferIndex(-1); 190 avImage->SetMediaCodecBufferIndex(-1);
191 } 191 }
192 } 192 }
193 193
194 } // namespace content 194 } // namespace content
OLDNEW
« no previous file with comments | « components/mus/gles2/command_buffer_local.cc ('k') | content/common/gpu/media/avda_codec_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698