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

Side by Side Diff: gpu/command_buffer/client/query_tracker.cc

Issue 1919203003: Revert of Report lost context from GLES2Implementation based on share group state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/command_buffer/client/gpu_control.h ('k') | gpu/command_buffer/client/share_group.h » ('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) 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/command_buffer/client/query_tracker.h" 5 #include "gpu/command_buffer/client/query_tracker.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 #include <GLES2/gl2extchromium.h> 9 #include <GLES2/gl2extchromium.h>
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 MarkAsActive(); 168 MarkAsActive();
169 flush_count_ = gl->helper()->flush_generation(); 169 flush_count_ = gl->helper()->flush_generation();
170 gl->helper()->QueryCounterEXT(id(), target(), shm_id(), shm_offset(), 170 gl->helper()->QueryCounterEXT(id(), target(), shm_id(), shm_offset(),
171 submit_count()); 171 submit_count());
172 MarkAsPending(gl->helper()->InsertToken()); 172 MarkAsPending(gl->helper()->InsertToken());
173 } 173 }
174 174
175 bool QueryTracker::Query::CheckResultsAvailable( 175 bool QueryTracker::Query::CheckResultsAvailable(
176 CommandBufferHelper* helper) { 176 CommandBufferHelper* helper) {
177 if (Pending()) { 177 if (Pending()) {
178 bool processed_all = 178 if (base::subtle::Acquire_Load(&info_.sync->process_count) ==
179 base::subtle::Acquire_Load(&info_.sync->process_count) == submit_count_; 179 submit_count_ ||
180 // We check lost on the command buffer itself here instead of checking the 180 helper->IsContextLost()) {
181 // GLES2Implementation because the GLES2Implementation will not hear about
182 // the loss until we exit out of this call stack (to avoid re-entrancy), and
183 // we need be able to enter kComplete state on context loss.
184 // TODO(danakj): If GLES2Implementation can handle being notified of loss
185 // re-entrantly (without calling its clients re-entrantly), then we could
186 // call GLES2Implementation::GetGraphicsResetStatusKHR() here and remove
187 // this method from CommandBufferHelper.
188 if (processed_all || helper->IsContextLost()) {
189 switch (target()) { 181 switch (target()) {
190 case GL_COMMANDS_ISSUED_CHROMIUM: 182 case GL_COMMANDS_ISSUED_CHROMIUM:
191 result_ = info_.sync->result; 183 result_ = info_.sync->result;
192 break; 184 break;
193 case GL_LATENCY_QUERY_CHROMIUM: 185 case GL_LATENCY_QUERY_CHROMIUM:
194 // Disabled DCHECK because of http://crbug.com/419236. 186 // Disabled DCHECK because of http://crbug.com/419236.
195 //DCHECK(info_.sync->result >= client_begin_time_us_); 187 //DCHECK(info_.sync->result >= client_begin_time_us_);
196 result_ = info_.sync->result - client_begin_time_us_; 188 result_ = info_.sync->result - client_begin_time_us_;
197 break; 189 break;
198 case GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM: 190 case GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM:
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (local_disjoint_count_ != disjoint_count) { 385 if (local_disjoint_count_ != disjoint_count) {
394 local_disjoint_count_ = disjoint_count; 386 local_disjoint_count_ = disjoint_count;
395 return true; 387 return true;
396 } 388 }
397 } 389 }
398 return false; 390 return false;
399 } 391 }
400 392
401 } // namespace gles2 393 } // namespace gles2
402 } // namespace gpu 394 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gpu_control.h ('k') | gpu/command_buffer/client/share_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698