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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioSummingJunction.cpp

Issue 2809023002: Replace ASSERT/ASSERT_NOT_REACHED with DCHECK/NOTREACHED in modules/webaudio (Closed)
Patch Set: Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 19 matching lines...) Expand all
30 namespace blink { 30 namespace blink {
31 31
32 AudioSummingJunction::AudioSummingJunction(DeferredTaskHandler& handler) 32 AudioSummingJunction::AudioSummingJunction(DeferredTaskHandler& handler)
33 : deferred_task_handler_(handler), rendering_state_need_updating_(false) {} 33 : deferred_task_handler_(handler), rendering_state_need_updating_(false) {}
34 34
35 AudioSummingJunction::~AudioSummingJunction() { 35 AudioSummingJunction::~AudioSummingJunction() {
36 GetDeferredTaskHandler().RemoveMarkedSummingJunction(this); 36 GetDeferredTaskHandler().RemoveMarkedSummingJunction(this);
37 } 37 }
38 38
39 void AudioSummingJunction::ChangedOutputs() { 39 void AudioSummingJunction::ChangedOutputs() {
40 ASSERT(GetDeferredTaskHandler().IsGraphOwner()); 40 DCHECK(GetDeferredTaskHandler().IsGraphOwner());
41 if (!rendering_state_need_updating_) { 41 if (!rendering_state_need_updating_) {
42 GetDeferredTaskHandler().MarkSummingJunctionDirty(this); 42 GetDeferredTaskHandler().MarkSummingJunctionDirty(this);
43 rendering_state_need_updating_ = true; 43 rendering_state_need_updating_ = true;
44 } 44 }
45 } 45 }
46 46
47 void AudioSummingJunction::UpdateRenderingState() { 47 void AudioSummingJunction::UpdateRenderingState() {
48 DCHECK(GetDeferredTaskHandler().IsAudioThread()); 48 DCHECK(GetDeferredTaskHandler().IsAudioThread());
49 ASSERT(GetDeferredTaskHandler().IsGraphOwner()); 49 DCHECK(GetDeferredTaskHandler().IsGraphOwner());
50 if (rendering_state_need_updating_) { 50 if (rendering_state_need_updating_) {
51 // Copy from m_outputs to m_renderingOutputs. 51 // Copy from m_outputs to m_renderingOutputs.
52 rendering_outputs_.Resize(outputs_.size()); 52 rendering_outputs_.Resize(outputs_.size());
53 unsigned j = 0; 53 unsigned j = 0;
54 for (AudioNodeOutput* output : outputs_) { 54 for (AudioNodeOutput* output : outputs_) {
55 rendering_outputs_[j++] = output; 55 rendering_outputs_[j++] = output;
56 output->UpdateRenderingState(); 56 output->UpdateRenderingState();
57 } 57 }
58 58
59 DidUpdate(); 59 DidUpdate();
60 60
61 rendering_state_need_updating_ = false; 61 rendering_state_need_updating_ = false;
62 } 62 }
63 } 63 }
64 64
65 } // namespace blink 65 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698