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

Side by Side Diff: content/common/gpu/client/command_buffer_proxy_impl.cc

Issue 1525273003: gpu: Fix a bug in the generation of the destruction sync token for GMBs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | 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 "content/common/gpu/client/command_buffer_proxy_impl.h" 5 #include "content/common/gpu/client/command_buffer_proxy_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 params.gpu_memory_buffer = handle; 442 params.gpu_memory_buffer = handle;
443 params.size = gfx::Size(width, height); 443 params.size = gfx::Size(width, height);
444 params.format = gpu_memory_buffer->GetFormat(); 444 params.format = gpu_memory_buffer->GetFormat();
445 params.internal_format = internal_format; 445 params.internal_format = internal_format;
446 params.image_release_count = image_fence_sync; 446 params.image_release_count = image_fence_sync;
447 447
448 if (!Send(new GpuCommandBufferMsg_CreateImage(route_id_, params))) 448 if (!Send(new GpuCommandBufferMsg_CreateImage(route_id_, params)))
449 return -1; 449 return -1;
450 450
451 if (image_fence_sync) { 451 if (image_fence_sync) {
452 gpu::SyncToken sync_token(GetNamespaceID(), GetCommandBufferID(), 452 gpu::SyncToken sync_token(GetNamespaceID(), GetExtraCommandBufferData(),
453 GetExtraCommandBufferData(), image_fence_sync); 453 GetCommandBufferID(), image_fence_sync);
454 454
455 // Force a synchronous IPC to validate sync token. 455 // Force a synchronous IPC to validate sync token.
456 channel_->ValidateFlushIDReachedServer(stream_id_, true); 456 channel_->ValidateFlushIDReachedServer(stream_id_, true);
457 sync_token.SetVerifyFlush(); 457 sync_token.SetVerifyFlush();
458 458
459 gpu_memory_buffer_manager->SetDestructionSyncToken(gpu_memory_buffer, 459 gpu_memory_buffer_manager->SetDestructionSyncToken(gpu_memory_buffer,
460 sync_token); 460 sync_token);
461 } 461 }
462 462
463 return new_id; 463 return new_id;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 } 766 }
767 } 767 }
768 768
769 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase, 769 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase,
770 base::TimeDelta interval) { 770 base::TimeDelta interval) {
771 if (!update_vsync_parameters_completion_callback_.is_null()) 771 if (!update_vsync_parameters_completion_callback_.is_null())
772 update_vsync_parameters_completion_callback_.Run(timebase, interval); 772 update_vsync_parameters_completion_callback_.Run(timebase, interval);
773 } 773 }
774 774
775 } // namespace content 775 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698