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

Side by Side Diff: gpu/gles2_conform_support/egl/display.cc

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted mojo readme, changed wait() to take a pointer Created 5 years, 2 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 | « gpu/gles2_conform_support/egl/display.h ('k') | gpu/gpu.gyp » ('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 "gpu/gles2_conform_support/egl/display.h" 5 #include "gpu/gles2_conform_support/egl/display.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 17 matching lines...) Expand all
28 namespace egl { 28 namespace egl {
29 29
30 Display::Display(EGLNativeDisplayType display_id) 30 Display::Display(EGLNativeDisplayType display_id)
31 : display_id_(display_id), 31 : display_id_(display_id),
32 is_initialized_(false), 32 is_initialized_(false),
33 #if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY) 33 #if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY)
34 exit_manager_(new base::AtExitManager), 34 exit_manager_(new base::AtExitManager),
35 #endif 35 #endif
36 create_offscreen_(false), 36 create_offscreen_(false),
37 create_offscreen_width_(0), 37 create_offscreen_width_(0),
38 create_offscreen_height_(0) { 38 create_offscreen_height_(0),
39 next_fence_sync_release_(1) {
39 } 40 }
40 41
41 Display::~Display() { 42 Display::~Display() {
42 gles2::Terminate(); 43 gles2::Terminate();
43 } 44 }
44 45
45 bool Display::Initialize() { 46 bool Display::Initialize() {
46 gles2::Initialize(); 47 gles2::Initialize();
47 is_initialized_ = true; 48 is_initialized_ = true;
48 return true; 49 return true;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 346 }
346 347
347 gpu::CommandBufferNamespace Display::GetNamespaceID() const { 348 gpu::CommandBufferNamespace Display::GetNamespaceID() const {
348 return gpu::CommandBufferNamespace::IN_PROCESS; 349 return gpu::CommandBufferNamespace::IN_PROCESS;
349 } 350 }
350 351
351 uint64_t Display::GetCommandBufferID() const { 352 uint64_t Display::GetCommandBufferID() const {
352 return 0; 353 return 0;
353 } 354 }
354 355
356 uint64_t Display::GenerateFenceSyncRelease() {
357 return next_fence_sync_release_++;
358 }
359
360 bool Display::IsFenceSyncRelease(uint64_t release) {
361 return release > 0 && release < next_fence_sync_release_;
362 }
363
364 bool Display::IsFenceSyncFlushed(uint64_t release) {
365 return IsFenceSyncRelease(release);
366 }
367
355 } // namespace egl 368 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/gles2_conform_support/egl/display.h ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698