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 "content/common/gpu/gpu_channel.h" | 5 #include "content/common/gpu/gpu_channel.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 switch (msg.type()) { | 903 switch (msg.type()) { |
904 case GpuCommandBufferMsg_WaitForGetOffsetInRange::ID: | 904 case GpuCommandBufferMsg_WaitForGetOffsetInRange::ID: |
905 case GpuCommandBufferMsg_WaitForTokenInRange::ID: | 905 case GpuCommandBufferMsg_WaitForTokenInRange::ID: |
906 router_.RouteMessage(msg); | 906 router_.RouteMessage(msg); |
907 break; | 907 break; |
908 default: | 908 default: |
909 NOTREACHED(); | 909 NOTREACHED(); |
910 } | 910 } |
911 } | 911 } |
912 | 912 |
| 913 #if defined(OS_ANDROID) |
| 914 const GpuCommandBufferStub* GpuChannel::GetOneStub() const { |
| 915 for (const auto& kv : stubs_) { |
| 916 const GpuCommandBufferStub* stub = kv.second; |
| 917 if (stub->decoder() && !stub->decoder()->WasContextLost()) |
| 918 return stub; |
| 919 } |
| 920 return nullptr; |
| 921 } |
| 922 #endif |
| 923 |
913 void GpuChannel::OnCreateOffscreenCommandBuffer( | 924 void GpuChannel::OnCreateOffscreenCommandBuffer( |
914 const gfx::Size& size, | 925 const gfx::Size& size, |
915 const GPUCreateCommandBufferConfig& init_params, | 926 const GPUCreateCommandBufferConfig& init_params, |
916 int32 route_id, | 927 int32 route_id, |
917 bool* succeeded) { | 928 bool* succeeded) { |
918 TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer", "route_id", | 929 TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer", "route_id", |
919 route_id); | 930 route_id); |
920 | 931 |
921 int32 share_group_id = init_params.share_group_id; | 932 int32 share_group_id = init_params.share_group_id; |
922 GpuCommandBufferStub* share_group = stubs_.get(share_group_id); | 933 GpuCommandBufferStub* share_group = stubs_.get(share_group_id); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 } | 1084 } |
1074 } | 1085 } |
1075 } | 1086 } |
1076 | 1087 |
1077 void GpuChannel::HandleUpdateValueState( | 1088 void GpuChannel::HandleUpdateValueState( |
1078 unsigned int target, const gpu::ValueState& state) { | 1089 unsigned int target, const gpu::ValueState& state) { |
1079 pending_valuebuffer_state_->UpdateState(target, state); | 1090 pending_valuebuffer_state_->UpdateState(target, state); |
1080 } | 1091 } |
1081 | 1092 |
1082 } // namespace content | 1093 } // namespace content |
OLD | NEW |