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

Side by Side Diff: content/common/gpu/gpu_channel.cc

Issue 1366473002: Move WakeUpGpu logic to GpuChannelManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 5 years, 2 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 | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.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 "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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698