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

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

Issue 2052103002: Enable deferred rendering strategy for Android WebView for Spitzer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spitzer-aw-disable-tests
Patch Set: Addressed comments, fixed Windows compilation Created 4 years, 5 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 | « media/filters/gpu_video_decoder.cc ('k') | media/gpu/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 MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
6 #define MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // components need to be reset upon EOS to decode a later stream. Input state 341 // components need to be reset upon EOS to decode a later stream. Input state
342 // (e.g. queued BitstreamBuffers) is not reset, as input following an EOS 342 // (e.g. queued BitstreamBuffers) is not reset, as input following an EOS
343 // is still valid and should be processed. 343 // is still valid and should be processed.
344 void ResetCodecState(); 344 void ResetCodecState();
345 345
346 // Registered to be called when surfaces are being destroyed. If |surface_id| 346 // Registered to be called when surfaces are being destroyed. If |surface_id|
347 // is our surface, we should release the MediaCodec before returning from 347 // is our surface, we should release the MediaCodec before returning from
348 // this. 348 // this.
349 void OnDestroyingSurface(int surface_id); 349 void OnDestroyingSurface(int surface_id);
350 350
351 // Return true if and only if we should use deferred rendering. 351 // Returns true if and only if we should use deferred rendering.
352 static bool UseDeferredRenderingStrategy( 352 static bool UseDeferredRenderingStrategy(
353 const gpu::GpuPreferences& gpu_preferences); 353 const gpu::GpuPreferences& gpu_preferences);
354 354
355 // Returns true if frame's COPY_REQUIRED flag needs to be set when using
356 // deferred strategy.
357 static bool UseTextureCopyForDeferredStrategy(
358 const gpu::GpuPreferences& gpu_preferences);
359
355 // Used to DCHECK that we are called on the correct thread. 360 // Used to DCHECK that we are called on the correct thread.
356 base::ThreadChecker thread_checker_; 361 base::ThreadChecker thread_checker_;
357 362
358 // To expose client callbacks from VideoDecodeAccelerator. 363 // To expose client callbacks from VideoDecodeAccelerator.
359 Client* client_; 364 Client* client_;
360 365
361 // Callback to set the correct gl context. 366 // Callback to set the correct gl context.
362 MakeGLContextCurrentCallback make_context_current_cb_; 367 MakeGLContextCurrentCallback make_context_current_cb_;
363 368
364 // Callback to get the GLES2Decoder instance. 369 // Callback to get the GLES2Decoder instance.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 472
468 // WeakPtrFactory for posting tasks back to |this|. 473 // WeakPtrFactory for posting tasks back to |this|.
469 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; 474 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_;
470 475
471 friend class AndroidVideoDecodeAcceleratorTest; 476 friend class AndroidVideoDecodeAcceleratorTest;
472 }; 477 };
473 478
474 } // namespace media 479 } // namespace media
475 480
476 #endif // MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 481 #endif // MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698