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

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: Created 4 years, 6 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 (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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // components need to be reset upon EOS to decode a later stream. Input state 337 // components need to be reset upon EOS to decode a later stream. Input state
338 // (e.g. queued BitstreamBuffers) is not reset, as input following an EOS 338 // (e.g. queued BitstreamBuffers) is not reset, as input following an EOS
339 // is still valid and should be processed. 339 // is still valid and should be processed.
340 void ResetCodecState(); 340 void ResetCodecState();
341 341
342 // Registered to be called when surfaces are being destroyed. If |surface_id| 342 // Registered to be called when surfaces are being destroyed. If |surface_id|
343 // is our surface, we should release the MediaCodec before returning from 343 // is our surface, we should release the MediaCodec before returning from
344 // this. 344 // this.
345 void OnDestroyingSurface(int surface_id); 345 void OnDestroyingSurface(int surface_id);
346 346
347 // Return true if and only if we should use deferred rendering. 347 // Returns true if and only if we should use deferred rendering.
348 static bool UseDeferredRenderingStrategy( 348 static bool UseDeferredRenderingStrategy(
349 const gpu::GpuPreferences& gpu_preferences); 349 const gpu::GpuPreferences& gpu_preferences);
350 350
351 // Returns true if frame's COPY_REQUIRED flag needs to be set.
352 static bool RequiresTextureCopy(const gpu::GpuPreferences& gpu_preferences);
353
351 // Used to DCHECK that we are called on the correct thread. 354 // Used to DCHECK that we are called on the correct thread.
352 base::ThreadChecker thread_checker_; 355 base::ThreadChecker thread_checker_;
353 356
354 // To expose client callbacks from VideoDecodeAccelerator. 357 // To expose client callbacks from VideoDecodeAccelerator.
355 Client* client_; 358 Client* client_;
356 359
357 // Callback to set the correct gl context. 360 // Callback to set the correct gl context.
358 MakeGLContextCurrentCallback make_context_current_cb_; 361 MakeGLContextCurrentCallback make_context_current_cb_;
359 362
360 // Callback to get the GLES2Decoder instance. 363 // Callback to get the GLES2Decoder instance.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 466
464 // WeakPtrFactory for posting tasks back to |this|. 467 // WeakPtrFactory for posting tasks back to |this|.
465 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; 468 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_;
466 469
467 friend class AndroidVideoDecodeAcceleratorTest; 470 friend class AndroidVideoDecodeAcceleratorTest;
468 }; 471 };
469 472
470 } // namespace media 473 } // namespace media
471 474
472 #endif // MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 475 #endif // MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698