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

Side by Side Diff: ui/gl/gl_fence_egl.cc

Issue 496313004: Remove implicit conversions from scoped_refptr to T* in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 "ui/gl/gl_fence_egl.h" 5 #include "ui/gl/gl_fence_egl.h"
6 6
7 #include "ui/gl/gl_bindings.h" 7 #include "ui/gl/gl_bindings.h"
8 #include "ui/gl/gl_context.h" 8 #include "ui/gl/gl_context.h"
9 9
10 namespace gfx { 10 namespace gfx {
(...skipping 14 matching lines...) Expand all
25 if (eglGetSyncAttribKHR(display_, sync_, EGL_SYNC_STATUS_KHR, &value) != 25 if (eglGetSyncAttribKHR(display_, sync_, EGL_SYNC_STATUS_KHR, &value) !=
26 EGL_TRUE) { 26 EGL_TRUE) {
27 return true; 27 return true;
28 } 28 }
29 29
30 DCHECK(value == EGL_SIGNALED_KHR || value == EGL_UNSIGNALED_KHR); 30 DCHECK(value == EGL_SIGNALED_KHR || value == EGL_UNSIGNALED_KHR);
31 return !value || value == EGL_SIGNALED_KHR; 31 return !value || value == EGL_SIGNALED_KHR;
32 } 32 }
33 33
34 void GLFenceEGL::ClientWait() { 34 void GLFenceEGL::ClientWait() {
35 if (!flush_event_ || flush_event_->IsSignaled()) { 35 if (!flush_event_.get() || flush_event_->IsSignaled()) {
36 EGLint flags = 0; 36 EGLint flags = 0;
37 EGLTimeKHR time = EGL_FOREVER_KHR; 37 EGLTimeKHR time = EGL_FOREVER_KHR;
38 eglClientWaitSyncKHR(display_, sync_, flags, time); 38 eglClientWaitSyncKHR(display_, sync_, flags, time);
39 } else { 39 } else {
40 LOG(ERROR) << "Trying to wait for uncommitted fence. Skipping..."; 40 LOG(ERROR) << "Trying to wait for uncommitted fence. Skipping...";
41 } 41 }
42 } 42 }
43 43
44 void GLFenceEGL::ServerWait() { 44 void GLFenceEGL::ServerWait() {
45 if (!flush_event_ || flush_event_->IsSignaled()) { 45 if (!flush_event_.get() || flush_event_->IsSignaled()) {
46 EGLint flags = 0; 46 EGLint flags = 0;
47 eglWaitSyncKHR(display_, sync_, flags); 47 eglWaitSyncKHR(display_, sync_, flags);
48 } else { 48 } else {
49 LOG(ERROR) << "Trying to wait for uncommitted fence. Skipping..."; 49 LOG(ERROR) << "Trying to wait for uncommitted fence. Skipping...";
50 } 50 }
51 } 51 }
52 52
53 GLFenceEGL::~GLFenceEGL() { 53 GLFenceEGL::~GLFenceEGL() {
54 eglDestroySyncKHR(display_, sync_); 54 eglDestroySyncKHR(display_, sync_);
55 } 55 }
56 56
57 } // namespace gfx 57 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698