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

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

Issue 123563002: Remove gpu side LatencyInfo merging (Closed) Base URL: http://git.chromium.org/chromium/src.git@gpu-per-event-latency-6-small
Patch Set: fix mac_rel compiler error. Move kMaxLatencyInfoNumber to .cc file Created 6 years, 11 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_command_buffer_stub.h ('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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 Send(reply_message); 560 Send(reply_message);
561 561
562 if (handle_.is_null() && !active_url_.is_empty()) { 562 if (handle_.is_null() && !active_url_.is_empty()) {
563 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); 563 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
564 gpu_channel_manager->Send(new GpuHostMsg_DidCreateOffscreenContext( 564 gpu_channel_manager->Send(new GpuHostMsg_DidCreateOffscreenContext(
565 active_url_)); 565 active_url_));
566 } 566 }
567 } 567 }
568 568
569 void GpuCommandBufferStub::OnSetLatencyInfo( 569 void GpuCommandBufferStub::OnSetLatencyInfo(
570 const ui::LatencyInfo& latency_info) { 570 const std::vector<ui::LatencyInfo>& latency_info) {
571 if (!ui::LatencyInfo::Verify(latency_info,
572 "GpuCommandBufferStub::OnSetLatencyInfo"))
573 return;
571 if (!latency_info_callback_.is_null()) 574 if (!latency_info_callback_.is_null())
572 latency_info_callback_.Run(latency_info); 575 latency_info_callback_.Run(latency_info);
573 } 576 }
574 577
575 void GpuCommandBufferStub::SetLatencyInfoCallback( 578 void GpuCommandBufferStub::SetLatencyInfoCallback(
576 const LatencyInfoCallback& callback) { 579 const LatencyInfoCallback& callback) {
577 latency_info_callback_ = callback; 580 latency_info_callback_ = callback;
578 } 581 }
579 582
580 int32 GpuCommandBufferStub::GetRequestedAttribute(int attr) const { 583 int32 GpuCommandBufferStub::GetRequestedAttribute(int attr) const {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 if (decoder_) 964 if (decoder_)
962 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); 965 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB);
963 command_buffer_->SetParseError(gpu::error::kLostContext); 966 command_buffer_->SetParseError(gpu::error::kLostContext);
964 } 967 }
965 968
966 uint64 GpuCommandBufferStub::GetMemoryUsage() const { 969 uint64 GpuCommandBufferStub::GetMemoryUsage() const {
967 return GetMemoryManager()->GetClientMemoryUsage(this); 970 return GetMemoryManager()->GetClientMemoryUsage(this);
968 } 971 }
969 972
970 } // namespace content 973 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698