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

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

Issue 1469863003: Cleanup SurfaceVisibility code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase.. Created 5 years 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/hash.h" 8 #include "base/hash.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 OnWaitForGetOffsetInRange); 298 OnWaitForGetOffsetInRange);
299 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_AsyncFlush, OnAsyncFlush); 299 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_AsyncFlush, OnAsyncFlush);
300 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RegisterTransferBuffer, 300 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RegisterTransferBuffer,
301 OnRegisterTransferBuffer); 301 OnRegisterTransferBuffer);
302 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyTransferBuffer, 302 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyTransferBuffer,
303 OnDestroyTransferBuffer); 303 OnDestroyTransferBuffer);
304 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder, 304 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoDecoder,
305 OnCreateVideoDecoder) 305 OnCreateVideoDecoder)
306 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoEncoder, 306 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_CreateVideoEncoder,
307 OnCreateVideoEncoder) 307 OnCreateVideoEncoder)
308 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SetSurfaceVisible,
309 OnSetSurfaceVisible)
310 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RetireSyncPoint, 308 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RetireSyncPoint,
311 OnRetireSyncPoint) 309 OnRetireSyncPoint)
312 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalSyncPoint, 310 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalSyncPoint,
313 OnSignalSyncPoint) 311 OnSignalSyncPoint)
314 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalSyncToken, 312 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalSyncToken,
315 OnSignalSyncToken) 313 OnSignalSyncToken)
316 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalQuery, 314 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalQuery,
317 OnSignalQuery) 315 OnSignalQuery)
318 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_CreateImage, OnCreateImage); 316 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_CreateImage, OnCreateImage);
319 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyImage, OnDestroyImage); 317 IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyImage, OnDestroyImage);
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 new GpuVideoEncodeAccelerator(encoder_route_id, this); 904 new GpuVideoEncodeAccelerator(encoder_route_id, this);
907 encoder->Initialize(input_format, 905 encoder->Initialize(input_format,
908 input_visible_size, 906 input_visible_size,
909 output_profile, 907 output_profile,
910 initial_bitrate, 908 initial_bitrate,
911 reply_message); 909 reply_message);
912 // encoder is registered as a DestructionObserver of this stub and will 910 // encoder is registered as a DestructionObserver of this stub and will
913 // self-delete during destruction of this stub. 911 // self-delete during destruction of this stub.
914 } 912 }
915 913
916 // TODO(sohanjg): cleanup this and the client side too.
917 void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) {
918 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetSurfaceVisible");
919 }
920
921 void GpuCommandBufferStub::InsertSyncPoint(uint32 sync_point, bool retire) { 914 void GpuCommandBufferStub::InsertSyncPoint(uint32 sync_point, bool retire) {
922 sync_points_.push_back(sync_point); 915 sync_points_.push_back(sync_point);
923 if (retire) { 916 if (retire) {
924 OnMessageReceived( 917 OnMessageReceived(
925 GpuCommandBufferMsg_RetireSyncPoint(route_id_, sync_point)); 918 GpuCommandBufferMsg_RetireSyncPoint(route_id_, sync_point));
926 } 919 }
927 } 920 }
928 921
929 void GpuCommandBufferStub::OnRetireSyncPoint(uint32 sync_point) { 922 void GpuCommandBufferStub::OnRetireSyncPoint(uint32 sync_point) {
930 DCHECK(!sync_points_.empty() && sync_points_.front() == sync_point); 923 DCHECK(!sync_points_.empty() && sync_points_.front() == sync_point);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 result)); 1251 result));
1259 } 1252 }
1260 1253
1261 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, 1254 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase,
1262 base::TimeDelta interval) { 1255 base::TimeDelta interval) {
1263 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, 1256 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase,
1264 interval)); 1257 interval));
1265 } 1258 }
1266 1259
1267 } // namespace content 1260 } // 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