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

Side by Side Diff: gpu/ipc/client/gpu_channel_host.cc

Issue 2222663002: Clear old verified flush IDs when doing OrderingBarrier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « gpu/ipc/client/gpu_channel_host.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "gpu/ipc/client/gpu_channel_host.h" 5 #include "gpu/ipc/client/gpu_channel_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return result; 128 return result;
129 } 129 }
130 130
131 uint32_t GpuChannelHost::OrderingBarrier( 131 uint32_t GpuChannelHost::OrderingBarrier(
132 int32_t route_id, 132 int32_t route_id,
133 int32_t stream_id, 133 int32_t stream_id,
134 int32_t put_offset, 134 int32_t put_offset,
135 uint32_t flush_count, 135 uint32_t flush_count,
136 const std::vector<ui::LatencyInfo>& latency_info, 136 const std::vector<ui::LatencyInfo>& latency_info,
137 bool put_offset_changed, 137 bool put_offset_changed,
138 bool do_flush) { 138 bool do_flush,
139 uint32_t* highest_verified_flush_id) {
139 AutoLock lock(context_lock_); 140 AutoLock lock(context_lock_);
140 StreamFlushInfo& flush_info = stream_flush_info_[stream_id]; 141 StreamFlushInfo& flush_info = stream_flush_info_[stream_id];
141 if (flush_info.flush_pending && flush_info.route_id != route_id) 142 if (flush_info.flush_pending && flush_info.route_id != route_id)
142 InternalFlush(&flush_info); 143 InternalFlush(&flush_info);
143 144
145 *highest_verified_flush_id = flush_info.verified_stream_flush_id;
146
144 if (put_offset_changed) { 147 if (put_offset_changed) {
145 const uint32_t flush_id = flush_info.next_stream_flush_id++; 148 const uint32_t flush_id = flush_info.next_stream_flush_id++;
146 flush_info.flush_pending = true; 149 flush_info.flush_pending = true;
147 flush_info.route_id = route_id; 150 flush_info.route_id = route_id;
148 flush_info.put_offset = put_offset; 151 flush_info.put_offset = put_offset;
149 flush_info.flush_count = flush_count; 152 flush_info.flush_count = flush_count;
150 flush_info.flush_id = flush_id; 153 flush_info.flush_id = flush_id;
151 flush_info.latency_info.insert(flush_info.latency_info.end(), 154 flush_info.latency_info.insert(flush_info.latency_info.end(),
152 latency_info.begin(), latency_info.end()); 155 latency_info.begin(), latency_info.end());
153 156
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 423
421 listeners_.clear(); 424 listeners_.clear();
422 } 425 }
423 426
424 bool GpuChannelHost::MessageFilter::IsLost() const { 427 bool GpuChannelHost::MessageFilter::IsLost() const {
425 AutoLock lock(lock_); 428 AutoLock lock(lock_);
426 return lost_; 429 return lost_;
427 } 430 }
428 431
429 } // namespace gpu 432 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_channel_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698