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

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

Issue 1830453002: WebGL: GL_RGB emulation for IOSurface backed textures. [For reference only] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile error. Created 4 years, 9 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/avda_codec_image.h" 5 #include "content/common/gpu/media/avda_codec_image.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "content/common/gpu/media/avda_shared_state.h" 10 #include "content/common/gpu/media/avda_shared_state.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 media_codec_->ReleaseOutputBuffer(codec_buffer_index_, true); 111 media_codec_->ReleaseOutputBuffer(codec_buffer_index_, true);
112 codec_buffer_index_ = kInvalidCodecBufferIndex; 112 codec_buffer_index_ = kInvalidCodecBufferIndex;
113 } 113 }
114 return true; 114 return true;
115 } 115 }
116 116
117 void AVDACodecImage::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 117 void AVDACodecImage::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
118 uint64_t process_tracing_id, 118 uint64_t process_tracing_id,
119 const std::string& dump_name) {} 119 const std::string& dump_name) {}
120 120
121 bool AVDACodecImage::EmulatingRGB() const {
122 return false;
123 }
124
121 void AVDACodecImage::UpdateSurfaceTexture(RestoreBindingsMode mode) { 125 void AVDACodecImage::UpdateSurfaceTexture(RestoreBindingsMode mode) {
122 DCHECK(surface_texture_); 126 DCHECK(surface_texture_);
123 127
124 // Render via the media codec if needed. 128 // Render via the media codec if needed.
125 if (!IsCodecBufferOutstanding()) 129 if (!IsCodecBufferOutstanding())
126 return; 130 return;
127 131
128 // The decoder buffer is still pending. 132 // The decoder buffer is still pending.
129 // This must be synchronous, so wait for OnFrameAvailable. 133 // This must be synchronous, so wait for OnFrameAvailable.
130 media_codec_->ReleaseOutputBuffer(codec_buffer_index_, true); 134 media_codec_->ReleaseOutputBuffer(codec_buffer_index_, true);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 235 }
232 236
233 memcpy(matrix, gl_matrix_, sizeof(gl_matrix_)); 237 memcpy(matrix, gl_matrix_, sizeof(gl_matrix_));
234 } 238 }
235 239
236 bool AVDACodecImage::IsCodecBufferOutstanding() const { 240 bool AVDACodecImage::IsCodecBufferOutstanding() const {
237 return codec_buffer_index_ != kInvalidCodecBufferIndex && media_codec_; 241 return codec_buffer_index_ != kInvalidCodecBufferIndex && media_codec_;
238 } 242 }
239 243
240 } // namespace content 244 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/avda_codec_image.h ('k') | content/common/gpu/stream_texture_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698