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

Side by Side Diff: gpu/command_buffer/service/mailbox_manager_sync.cc

Issue 898543002: Remove GLFence::CreateWithoutFlush (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove flush event Created 5 years, 10 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 | « no previous file | ui/gl/gl_context.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "gpu/command_buffer/service/mailbox_manager_sync.h" 5 #include "gpu/command_buffer/service/mailbox_manager_sync.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #if !defined(OS_MACOSX) 52 #if !defined(OS_MACOSX)
53 std::queue<SyncPointToFenceMap::iterator>& sync_points = g_sync_points.Get(); 53 std::queue<SyncPointToFenceMap::iterator>& sync_points = g_sync_points.Get();
54 SyncPointToFenceMap& sync_point_to_fence = g_sync_point_to_fence.Get(); 54 SyncPointToFenceMap& sync_point_to_fence = g_sync_point_to_fence.Get();
55 if (sync_point) { 55 if (sync_point) {
56 while (!sync_points.empty() && 56 while (!sync_points.empty() &&
57 sync_points.front()->second->HasCompleted()) { 57 sync_points.front()->second->HasCompleted()) {
58 sync_point_to_fence.erase(sync_points.front()); 58 sync_point_to_fence.erase(sync_points.front());
59 sync_points.pop(); 59 sync_points.pop();
60 } 60 }
61 // Need to use EGL fences since we are likely not in a single share group. 61 // Need to use EGL fences since we are likely not in a single share group.
62 linked_ptr<gfx::GLFence> fence(make_linked_ptr(new gfx::GLFenceEGL(true))); 62 linked_ptr<gfx::GLFence> fence(make_linked_ptr(new gfx::GLFenceEGL));
63 if (fence.get()) { 63 if (fence.get()) {
64 std::pair<SyncPointToFenceMap::iterator, bool> result = 64 std::pair<SyncPointToFenceMap::iterator, bool> result =
65 sync_point_to_fence.insert(std::make_pair(sync_point, fence)); 65 sync_point_to_fence.insert(std::make_pair(sync_point, fence));
66 DCHECK(result.second); 66 DCHECK(result.second);
67 sync_points.push(result.first); 67 sync_points.push(result.first);
68 } 68 }
69 DCHECK(sync_points.size() == sync_point_to_fence.size()); 69 DCHECK(sync_points.size() == sync_point_to_fence.size());
70 } 70 }
71 #endif 71 #endif
72 } 72 }
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 if (texture_version == definition.version() || 325 if (texture_version == definition.version() ||
326 definition.IsOlderThan(texture_version)) 326 definition.IsOlderThan(texture_version))
327 continue; 327 continue;
328 texture_version = definition.version(); 328 texture_version = definition.version();
329 definition.UpdateTexture(texture); 329 definition.UpdateTexture(texture);
330 } 330 }
331 } 331 }
332 332
333 } // namespace gles2 333 } // namespace gles2
334 } // namespace gpu 334 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | ui/gl/gl_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698