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

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

Issue 1129943006: Implement StreamTexture::BindTexImage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.h ('k') | gpu/ipc/common/gpu_messages.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/ipc/client/command_buffer_proxy_impl.h" 5 #include "gpu/ipc/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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 } 539 }
540 540
541 int32_t CommandBufferProxyImpl::GetImageGpuMemoryBufferId(unsigned image_id) { 541 int32_t CommandBufferProxyImpl::GetImageGpuMemoryBufferId(unsigned image_id) {
542 CheckLock(); 542 CheckLock();
543 auto it = image_gmb_ids_map_.find(image_id); 543 auto it = image_gmb_ids_map_.find(image_id);
544 if (it != image_gmb_ids_map_.end()) 544 if (it != image_gmb_ids_map_.end())
545 return it->second; 545 return it->second;
546 return -1; 546 return -1;
547 } 547 }
548 548
549 uint32_t CommandBufferProxyImpl::CreateStreamTexture(uint32_t texture_id) { 549 uint32_t CommandBufferProxyImpl::CreateStreamTexture(int32_t image_id) {
550 CheckLock(); 550 CheckLock();
551 if (last_state_.error != gpu::error::kNoError) 551 if (last_state_.error != gpu::error::kNoError)
552 return 0; 552 return 0;
553 553
554 int32_t stream_id = channel_->GenerateRouteID(); 554 int32_t stream_id = channel_->GenerateRouteID();
555 bool succeeded = false; 555 bool succeeded = false;
556 Send(new GpuCommandBufferMsg_CreateStreamTexture(route_id_, texture_id, 556 Send(new GpuCommandBufferMsg_CreateStreamTexture(route_id_, image_id,
557 stream_id, &succeeded)); 557 stream_id, &succeeded));
558 if (!succeeded) { 558 if (!succeeded) {
559 DLOG(ERROR) << "GpuCommandBufferMsg_CreateStreamTexture returned failure"; 559 DLOG(ERROR) << "GpuCommandBufferMsg_CreateStreamTexture returned failure";
560 return 0; 560 return 0;
561 } 561 }
562 return stream_id; 562 return stream_id;
563 } 563 }
564 564
565 void CommandBufferProxyImpl::SetLock(base::Lock* lock) { 565 void CommandBufferProxyImpl::SetLock(base::Lock* lock) {
566 lock_ = lock; 566 lock_ = lock;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 return; 866 return;
867 channel_->FlushPendingStream(stream_id_); 867 channel_->FlushPendingStream(stream_id_);
868 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); 868 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_));
869 channel_->RemoveRoute(route_id_); 869 channel_->RemoveRoute(route_id_);
870 channel_ = nullptr; 870 channel_ = nullptr;
871 if (gpu_control_client_) 871 if (gpu_control_client_)
872 gpu_control_client_->OnGpuControlLostContext(); 872 gpu_control_client_->OnGpuControlLostContext();
873 } 873 }
874 874
875 } // namespace gpu 875 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.h ('k') | gpu/ipc/common/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698