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

Side by Side Diff: content/common/gpu/client/command_buffer_proxy_impl.cc

Issue 1608313003: Only validate CommandBufferProxyImpl flush if channel exists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | 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 "content/common/gpu/client/command_buffer_proxy_impl.h" 5 #include "content/common/gpu/client/command_buffer_proxy_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 523
524 void CommandBufferProxyImpl::SetLock(base::Lock* lock) { 524 void CommandBufferProxyImpl::SetLock(base::Lock* lock) {
525 lock_ = lock; 525 lock_ = lock;
526 } 526 }
527 527
528 bool CommandBufferProxyImpl::IsGpuChannelLost() { 528 bool CommandBufferProxyImpl::IsGpuChannelLost() {
529 return !channel_ || channel_->IsLost(); 529 return !channel_ || channel_->IsLost();
530 } 530 }
531 531
532 void CommandBufferProxyImpl::EnsureWorkVisible() { 532 void CommandBufferProxyImpl::EnsureWorkVisible() {
533 channel_->ValidateFlushIDReachedServer(stream_id_, true); 533 if (channel_)
534 channel_->ValidateFlushIDReachedServer(stream_id_, true);
534 } 535 }
535 536
536 gpu::CommandBufferNamespace CommandBufferProxyImpl::GetNamespaceID() const { 537 gpu::CommandBufferNamespace CommandBufferProxyImpl::GetNamespaceID() const {
537 return gpu::CommandBufferNamespace::GPU_IO; 538 return gpu::CommandBufferNamespace::GPU_IO;
538 } 539 }
539 540
540 uint64_t CommandBufferProxyImpl::GetCommandBufferID() const { 541 uint64_t CommandBufferProxyImpl::GetCommandBufferID() const {
541 return command_buffer_id_; 542 return command_buffer_id_;
542 } 543 }
543 544
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 } 811 }
811 812
812 void CommandBufferProxyImpl::InvalidGpuReplyOnClientThread() { 813 void CommandBufferProxyImpl::InvalidGpuReplyOnClientThread() {
813 scoped_ptr<base::AutoLock> lock; 814 scoped_ptr<base::AutoLock> lock;
814 if (lock_) 815 if (lock_)
815 lock.reset(new base::AutoLock(*lock_)); 816 lock.reset(new base::AutoLock(*lock_));
816 OnDestroyed(gpu::error::kInvalidGpuMessage, gpu::error::kLostContext); 817 OnDestroyed(gpu::error::kInvalidGpuMessage, gpu::error::kLostContext);
817 } 818 }
818 819
819 } // namespace content 820 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698