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/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |