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 (!latency_info_callback_.is_null()) | 571 if (!latency_info_callback_.is_null()) |
572 latency_info_callback_.Run(latency_info); | 572 latency_info_callback_.Run(latency_info); |
573 } | 573 } |
574 | 574 |
575 void GpuCommandBufferStub::SetLatencyInfoCallback( | 575 void GpuCommandBufferStub::SetLatencyInfoCallback( |
576 const LatencyInfoCallback& callback) { | 576 const LatencyInfoCallback& callback) { |
577 latency_info_callback_ = callback; | 577 latency_info_callback_ = callback; |
578 } | 578 } |
579 | 579 |
580 int32 GpuCommandBufferStub::GetRequestedAttribute(int attr) const { | 580 int32 GpuCommandBufferStub::GetRequestedAttribute(int attr) const { |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 if (decoder_) | 961 if (decoder_) |
962 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); | 962 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); |
963 command_buffer_->SetParseError(gpu::error::kLostContext); | 963 command_buffer_->SetParseError(gpu::error::kLostContext); |
964 } | 964 } |
965 | 965 |
966 uint64 GpuCommandBufferStub::GetMemoryUsage() const { | 966 uint64 GpuCommandBufferStub::GetMemoryUsage() const { |
967 return GetMemoryManager()->GetClientMemoryUsage(this); | 967 return GetMemoryManager()->GetClientMemoryUsage(this); |
968 } | 968 } |
969 | 969 |
970 } // namespace content | 970 } // namespace content |
OLD | NEW |