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

Unified Diff: media/base/audio_renderer_sink.h

Issue 2038053002: Change audio render thread checking to use new AudioRendererSink::BelongsToRendererThread() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. Rebase. 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 side-by-side diff with in-line comments
Download patch
Index: media/base/audio_renderer_sink.h
diff --git a/media/base/audio_renderer_sink.h b/media/base/audio_renderer_sink.h
index b0b5f26a729d3667882ded2265250250430b7c9e..268b9b6c45c33f2bfb02fc4352fb010bd7aed28e 100644
--- a/media/base/audio_renderer_sink.h
+++ b/media/base/audio_renderer_sink.h
@@ -70,6 +70,11 @@ class AudioRendererSink
// Must never be called on the IO thread.
virtual OutputDeviceInfo GetOutputDeviceInfo() = 0;
+ // If DCHECKs are enabled, this function returns true if called on rendering
+ // thread, otherwise false. With DCHECKs disabled, it returns true. Thus, it
+ // is intended to be used for DCHECKing.
tommi (sloooow) - chröme 2016/06/15 19:29:11 should we make this method only available in build
Henrik Grunell 2016/06/16 12:19:16 Same here, I slightly prefer not to clutter with i
+ virtual bool CurrentThreadIsRenderingThread() = 0;
+
protected:
friend class base::RefCountedThreadSafe<AudioRendererSink>;
virtual ~AudioRendererSink() {}

Powered by Google App Engine
This is Rietveld 408576698