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

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

Issue 12806006: Add EncodeBackbufferCHROMIUM support to GLES2 command stream (Closed) Base URL: https://chromium.googlesource.com/chromium/src@yuv_2
Patch Set: Removed extraneous file. Created 7 years, 9 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') | gpu/GLES2/gl2chromium_autogen.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/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 decoder_->SetMsgCallback( 522 decoder_->SetMsgCallback(
523 base::Bind(&GpuCommandBufferStub::SendConsoleMessage, 523 base::Bind(&GpuCommandBufferStub::SendConsoleMessage,
524 base::Unretained(this))); 524 base::Unretained(this)));
525 decoder_->SetShaderCacheCallback( 525 decoder_->SetShaderCacheCallback(
526 base::Bind(&GpuCommandBufferStub::SendCachedShader, 526 base::Bind(&GpuCommandBufferStub::SendCachedShader,
527 base::Unretained(this))); 527 base::Unretained(this)));
528 decoder_->SetWaitSyncPointCallback( 528 decoder_->SetWaitSyncPointCallback(
529 base::Bind(&GpuCommandBufferStub::OnWaitSyncPoint, 529 base::Bind(&GpuCommandBufferStub::OnWaitSyncPoint,
530 base::Unretained(this))); 530 base::Unretained(this)));
531 531
532 decoder_->SetEncodeBackbufferCallback(
533 base::Bind(&GpuCommandBufferStub::OnEncodeBackbuffer,
534 base::Unretained(this)));
535
532 command_buffer_->SetPutOffsetChangeCallback( 536 command_buffer_->SetPutOffsetChangeCallback(
533 base::Bind(&GpuCommandBufferStub::PutChanged, base::Unretained(this))); 537 base::Bind(&GpuCommandBufferStub::PutChanged, base::Unretained(this)));
534 command_buffer_->SetGetBufferChangeCallback( 538 command_buffer_->SetGetBufferChangeCallback(
535 base::Bind(&gpu::GpuScheduler::SetGetBuffer, 539 base::Bind(&gpu::GpuScheduler::SetGetBuffer,
536 base::Unretained(scheduler_.get()))); 540 base::Unretained(scheduler_.get())));
537 command_buffer_->SetParseErrorCallback( 541 command_buffer_->SetParseErrorCallback(
538 base::Bind(&GpuCommandBufferStub::OnParseError, base::Unretained(this))); 542 base::Bind(&GpuCommandBufferStub::OnParseError, base::Unretained(this)));
539 scheduler_->SetSchedulingChangedCallback( 543 scheduler_->SetSchedulingChangedCallback(
540 base::Bind(&GpuChannel::StubSchedulingChanged, 544 base::Bind(&GpuChannel::StubSchedulingChanged,
541 base::Unretained(channel_))); 545 base::Unretained(channel_)));
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 sync_point, 843 sync_point,
840 base::Bind(&GpuCommandBufferStub::OnSignalSyncPointAck, 844 base::Bind(&GpuCommandBufferStub::OnSignalSyncPointAck,
841 this->AsWeakPtr(), 845 this->AsWeakPtr(),
842 id)); 846 id));
843 } 847 }
844 848
845 void GpuCommandBufferStub::OnSignalSyncPointAck(uint32 id) { 849 void GpuCommandBufferStub::OnSignalSyncPointAck(uint32 id) {
846 Send(new GpuCommandBufferMsg_SignalSyncPointAck(route_id_, id)); 850 Send(new GpuCommandBufferMsg_SignalSyncPointAck(route_id_, id));
847 } 851 }
848 852
853 void GpuCommandBufferStub::OnEncodeBackbuffer() {
854 }
855
849 void GpuCommandBufferStub::OnReceivedClientManagedMemoryStats( 856 void GpuCommandBufferStub::OnReceivedClientManagedMemoryStats(
850 const GpuManagedMemoryStats& stats) { 857 const GpuManagedMemoryStats& stats) {
851 TRACE_EVENT0( 858 TRACE_EVENT0(
852 "gpu", 859 "gpu",
853 "GpuCommandBufferStub::OnReceivedClientManagedMemoryStats"); 860 "GpuCommandBufferStub::OnReceivedClientManagedMemoryStats");
854 if (memory_manager_client_state_.get()) 861 if (memory_manager_client_state_.get())
855 memory_manager_client_state_->SetManagedMemoryStats(stats); 862 memory_manager_client_state_->SetManagedMemoryStats(stats);
856 } 863 }
857 864
858 void GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback( 865 void GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback(
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 if (surface_ && MakeCurrent()) 943 if (surface_ && MakeCurrent())
937 surface_->SetFrontbufferAllocation( 944 surface_->SetFrontbufferAllocation(
938 allocation.browser_allocation.suggest_have_frontbuffer); 945 allocation.browser_allocation.suggest_have_frontbuffer);
939 } 946 }
940 947
941 last_memory_allocation_valid_ = true; 948 last_memory_allocation_valid_ = true;
942 last_memory_allocation_ = allocation; 949 last_memory_allocation_ = allocation;
943 } 950 }
944 951
945 } // namespace content 952 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698