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

Side by Side Diff: content/common/gpu/media/android_video_decode_accelerator.h

Issue 1680213002: Start using deferred rendering for WebView on L. Base URL: https://chromium.googlesource.com/chromium/src.git@measure_copy
Patch Set: cleanup 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
« no previous file with comments | « no previous file | content/common/gpu/media/android_video_decode_accelerator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // is still valid and should be processed. 213 // is still valid and should be processed.
214 void ResetCodecState(); 214 void ResetCodecState();
215 215
216 // Dismiss all |output_picture_buffers_| in preparation for requesting new 216 // Dismiss all |output_picture_buffers_| in preparation for requesting new
217 // ones. 217 // ones.
218 void DismissPictureBuffers(); 218 void DismissPictureBuffers();
219 219
220 // Return true if and only if we should use deferred rendering. 220 // Return true if and only if we should use deferred rendering.
221 static bool UseDeferredRenderingStrategy(); 221 static bool UseDeferredRenderingStrategy();
222 222
223 // Return true if and only if the deferred strategy requires that the
224 // resulting VideoFrames have COPY_REQUIRED set. This is for WebView.
225 static bool DeferredStrategyNeedsBrowserCopy();
226
227 // Return true if and only if SurfaceTexture supports user-provided threads
228 // for OnFrameAvailable callbacks.
229 static bool IsCallbackThreadable();
230
223 // Used to DCHECK that we are called on the correct thread. 231 // Used to DCHECK that we are called on the correct thread.
224 base::ThreadChecker thread_checker_; 232 base::ThreadChecker thread_checker_;
225 233
226 // To expose client callbacks from VideoDecodeAccelerator. 234 // To expose client callbacks from VideoDecodeAccelerator.
227 Client* client_; 235 Client* client_;
228 236
229 // Callback to set the correct gl context. 237 // Callback to set the correct gl context.
230 base::Callback<bool(void)> make_context_current_; 238 base::Callback<bool(void)> make_context_current_;
231 239
232 // Codec type. Used when we configure media codec. 240 // Codec type. Used when we configure media codec.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 332
325 // WeakPtrFactory for posting tasks back to |this|. 333 // WeakPtrFactory for posting tasks back to |this|.
326 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; 334 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_;
327 335
328 friend class AndroidVideoDecodeAcceleratorTest; 336 friend class AndroidVideoDecodeAcceleratorTest;
329 }; 337 };
330 338
331 } // namespace content 339 } // namespace content
332 340
333 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 341 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698