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

Side by Side Diff: gpu/command_buffer/service/command_executor.cc

Issue 2021603002: gpu: Add a new extension CHROMIUM_deschedule. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from piman. 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) 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/service/command_executor.h" 5 #include "gpu/command_buffer/service/command_executor.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (decoder_) 53 if (decoder_)
54 decoder_->BeginDecoding(); 54 decoder_->BeginDecoding();
55 while (!parser_->IsEmpty()) { 55 while (!parser_->IsEmpty()) {
56 if (IsPreempted()) 56 if (IsPreempted())
57 break; 57 break;
58 58
59 DCHECK(scheduled()); 59 DCHECK(scheduled());
60 60
61 error = parser_->ProcessCommands(CommandParser::kParseCommandsSlice); 61 error = parser_->ProcessCommands(CommandParser::kParseCommandsSlice);
62 62
63 if (error == error::kDeferCommandUntilLater) { 63 if (error == error::kDeferCommandUntilLater ||
64 error == error::kDeferLaterCommands) {
piman 2016/05/31 22:39:21 I think we want to update the Get offset (since we
erikchen 2016/05/31 22:52:01 Good point. Done.
64 DCHECK(!scheduled()); 65 DCHECK(!scheduled());
65 break; 66 break;
66 } 67 }
67 68
68 // TODO(piman): various classes duplicate various pieces of state, leading 69 // TODO(piman): various classes duplicate various pieces of state, leading
69 // to needlessly complex update logic. It should be possible to simply 70 // to needlessly complex update logic. It should be possible to simply
70 // share the state across all of them. 71 // share the state across all of them.
71 command_buffer_->SetGetOffset(static_cast<int32_t>(parser_->get())); 72 command_buffer_->SetGetOffset(static_cast<int32_t>(parser_->get()));
72 73
73 if (error::IsError(error)) { 74 if (error::IsError(error)) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return (decoder_ && decoder_->HasMoreIdleWork()); 172 return (decoder_ && decoder_->HasMoreIdleWork());
172 } 173 }
173 174
174 void CommandExecutor::PerformIdleWork() { 175 void CommandExecutor::PerformIdleWork() {
175 if (!decoder_) 176 if (!decoder_)
176 return; 177 return;
177 decoder_->PerformIdleWork(); 178 decoder_->PerformIdleWork();
178 } 179 }
179 180
180 } // namespace gpu 181 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.h ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698