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/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 context, | 563 context, |
564 !surface_id(), | 564 !surface_id(), |
565 initial_size_, | 565 initial_size_, |
566 disallowed_features_, | 566 disallowed_features_, |
567 requested_attribs_)) { | 567 requested_attribs_)) { |
568 DLOG(ERROR) << "Failed to initialize decoder."; | 568 DLOG(ERROR) << "Failed to initialize decoder."; |
569 OnInitializeFailed(reply_message); | 569 OnInitializeFailed(reply_message); |
570 return; | 570 return; |
571 } | 571 } |
572 | 572 |
573 if (CommandLine::ForCurrentProcess()->HasSwitch( | 573 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
574 switches::kEnableGPUServiceLogging)) { | 574 switches::kEnableGPUServiceLogging)) { |
575 decoder_->set_log_commands(true); | 575 decoder_->set_log_commands(true); |
576 } | 576 } |
577 | 577 |
578 decoder_->GetLogger()->SetMsgCallback( | 578 decoder_->GetLogger()->SetMsgCallback( |
579 base::Bind(&GpuCommandBufferStub::SendConsoleMessage, | 579 base::Bind(&GpuCommandBufferStub::SendConsoleMessage, |
580 base::Unretained(this))); | 580 base::Unretained(this))); |
581 decoder_->SetShaderCacheCallback( | 581 decoder_->SetShaderCacheCallback( |
582 base::Bind(&GpuCommandBufferStub::SendCachedShader, | 582 base::Bind(&GpuCommandBufferStub::SendCachedShader, |
583 base::Unretained(this))); | 583 base::Unretained(this))); |
584 decoder_->SetWaitSyncPointCallback( | 584 decoder_->SetWaitSyncPointCallback( |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 uint64 GpuCommandBufferStub::GetMemoryUsage() const { | 1081 uint64 GpuCommandBufferStub::GetMemoryUsage() const { |
1082 return GetMemoryManager()->GetClientMemoryUsage(this); | 1082 return GetMemoryManager()->GetClientMemoryUsage(this); |
1083 } | 1083 } |
1084 | 1084 |
1085 void GpuCommandBufferStub::SwapBuffersCompleted( | 1085 void GpuCommandBufferStub::SwapBuffersCompleted( |
1086 const std::vector<ui::LatencyInfo>& latency_info) { | 1086 const std::vector<ui::LatencyInfo>& latency_info) { |
1087 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); | 1087 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); |
1088 } | 1088 } |
1089 | 1089 |
1090 } // namespace content | 1090 } // namespace content |
OLD | NEW |