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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.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, 3 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_manager.cc ('k') | content/common/gpu/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 "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/hash.h" 8 #include "base/hash.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 latency_info_callback_.Run(latency_info); 854 latency_info_callback_.Run(latency_info);
855 } 855 }
856 856
857 last_flush_count_ = flush_count; 857 last_flush_count_ = flush_count;
858 gpu::CommandBuffer::State pre_state = command_buffer_->GetLastState(); 858 gpu::CommandBuffer::State pre_state = command_buffer_->GetLastState();
859 command_buffer_->Flush(put_offset); 859 command_buffer_->Flush(put_offset);
860 gpu::CommandBuffer::State post_state = command_buffer_->GetLastState(); 860 gpu::CommandBuffer::State post_state = command_buffer_->GetLastState();
861 861
862 if (pre_state.get_offset != post_state.get_offset) 862 if (pre_state.get_offset != post_state.get_offset)
863 ReportState(); 863 ReportState();
864
865 #if defined(OS_ANDROID)
866 GpuChannelManager* manager = channel_->gpu_channel_manager();
867 manager->DidAccessGpu();
868 #endif
864 } 869 }
865 870
866 void GpuCommandBufferStub::OnRegisterTransferBuffer( 871 void GpuCommandBufferStub::OnRegisterTransferBuffer(
867 int32 id, 872 int32 id,
868 base::SharedMemoryHandle transfer_buffer, 873 base::SharedMemoryHandle transfer_buffer,
869 uint32 size) { 874 uint32 size) {
870 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnRegisterTransferBuffer"); 875 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnRegisterTransferBuffer");
871 876
872 // Take ownership of the memory and map it into this process. 877 // Take ownership of the memory and map it into this process.
873 // This validates the size. 878 // This validates the size.
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 result)); 1240 result));
1236 } 1241 }
1237 1242
1238 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, 1243 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase,
1239 base::TimeDelta interval) { 1244 base::TimeDelta interval) {
1240 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, 1245 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase,
1241 interval)); 1246 interval));
1242 } 1247 }
1243 1248
1244 } // namespace content 1249 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698