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

Side by Side Diff: src/core/SkSemaphore.cpp

Issue 2041943002: SkLeanWindows.h: #include "Windows.h" fewer places (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-06-07 (Tuesday) 11:28:42 EDT Created 4 years, 6 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 | « src/core/SkScan_Hairline.cpp ('k') | src/core/SkTSort.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 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "../private/SkLeanWindows.h"
8 #include "../private/SkSemaphore.h" 9 #include "../private/SkSemaphore.h"
9 10
10 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) 11 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
11 #include <mach/mach.h> 12 #include <mach/mach.h>
12 struct SkBaseSemaphore::OSSemaphore { 13 struct SkBaseSemaphore::OSSemaphore {
13 semaphore_t fSemaphore; 14 semaphore_t fSemaphore;
14 15
15 OSSemaphore() { 16 OSSemaphore() {
16 semaphore_create(mach_task_self(), &fSemaphore, SYNC_POLICY_LIFO, 0/ *initial count*/); 17 semaphore_create(mach_task_self(), &fSemaphore, SYNC_POLICY_LIFO, 0/ *initial count*/);
17 } 18 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 64 }
64 65
65 void SkBaseSemaphore::osWait() { 66 void SkBaseSemaphore::osWait() {
66 fOSSemaphoreOnce([this] { fOSSemaphore = new OSSemaphore; }); 67 fOSSemaphoreOnce([this] { fOSSemaphore = new OSSemaphore; });
67 fOSSemaphore->wait(); 68 fOSSemaphore->wait();
68 } 69 }
69 70
70 void SkBaseSemaphore::cleanup() { 71 void SkBaseSemaphore::cleanup() {
71 delete fOSSemaphore; 72 delete fOSSemaphore;
72 } 73 }
OLDNEW
« no previous file with comments | « src/core/SkScan_Hairline.cpp ('k') | src/core/SkTSort.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698