OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/hash.h" | 9 #include "base/hash.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 memory_manager_client_state_->SetVisible(visible); | 850 memory_manager_client_state_->SetVisible(visible); |
851 } | 851 } |
852 | 852 |
853 void GpuCommandBufferStub::AddSyncPoint(uint32 sync_point) { | 853 void GpuCommandBufferStub::AddSyncPoint(uint32 sync_point) { |
854 sync_points_.push_back(sync_point); | 854 sync_points_.push_back(sync_point); |
855 } | 855 } |
856 | 856 |
857 void GpuCommandBufferStub::OnRetireSyncPoint(uint32 sync_point) { | 857 void GpuCommandBufferStub::OnRetireSyncPoint(uint32 sync_point) { |
858 DCHECK(!sync_points_.empty() && sync_points_.front() == sync_point); | 858 DCHECK(!sync_points_.empty() && sync_points_.front() == sync_point); |
859 sync_points_.pop_front(); | 859 sync_points_.pop_front(); |
860 if (context_group_->mailbox_manager()->UsesSync() && MakeCurrent()) | |
861 context_group_->mailbox_manager()->PushTextureUpdates(); | |
862 GpuChannelManager* manager = channel_->gpu_channel_manager(); | 860 GpuChannelManager* manager = channel_->gpu_channel_manager(); |
863 manager->sync_point_manager()->RetireSyncPoint(sync_point); | 861 manager->sync_point_manager()->RetireSyncPoint(sync_point); |
864 } | 862 } |
865 | 863 |
866 bool GpuCommandBufferStub::OnWaitSyncPoint(uint32 sync_point) { | 864 bool GpuCommandBufferStub::OnWaitSyncPoint(uint32 sync_point) { |
867 if (!sync_point) | 865 if (!sync_point) |
868 return true; | 866 return true; |
869 GpuChannelManager* manager = channel_->gpu_channel_manager(); | 867 GpuChannelManager* manager = channel_->gpu_channel_manager(); |
870 if (manager->sync_point_manager()->IsSyncPointRetired(sync_point)) | 868 if (manager->sync_point_manager()->IsSyncPointRetired(sync_point)) |
871 return true; | 869 return true; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 uint64 GpuCommandBufferStub::GetMemoryUsage() const { | 1078 uint64 GpuCommandBufferStub::GetMemoryUsage() const { |
1081 return GetMemoryManager()->GetClientMemoryUsage(this); | 1079 return GetMemoryManager()->GetClientMemoryUsage(this); |
1082 } | 1080 } |
1083 | 1081 |
1084 void GpuCommandBufferStub::SwapBuffersCompleted( | 1082 void GpuCommandBufferStub::SwapBuffersCompleted( |
1085 const std::vector<ui::LatencyInfo>& latency_info) { | 1083 const std::vector<ui::LatencyInfo>& latency_info) { |
1086 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); | 1084 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); |
1087 } | 1085 } |
1088 | 1086 |
1089 } // namespace content | 1087 } // namespace content |
OLD | NEW |