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

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

Issue 1214603003: Revert of Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 5 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/SkDeviceProfile.cpp ('k') | src/core/SkGlyphCache.cpp » ('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 2014 Google Inc. 2 * Copyright 2014 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 "SkAtomics.h"
9 #include "SkCanvas.h" 8 #include "SkCanvas.h"
10 #include "SkDrawable.h" 9 #include "SkDrawable.h"
10 #include "SkThread.h"
11 11
12 static int32_t next_generation_id() { 12 static int32_t next_generation_id() {
13 static int32_t gCanvasDrawableGenerationID; 13 static int32_t gCanvasDrawableGenerationID;
14 14
15 // do a loop in case our global wraps around, as we never want to 15 // do a loop in case our global wraps around, as we never want to
16 // return a 0 16 // return a 0
17 int32_t genID; 17 int32_t genID;
18 do { 18 do {
19 genID = sk_atomic_inc(&gCanvasDrawableGenerationID) + 1; 19 genID = sk_atomic_inc(&gCanvasDrawableGenerationID) + 1;
20 } while (0 == genID); 20 } while (0 == genID);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 SkPictureRecorder recorder; 68 SkPictureRecorder recorder;
69 69
70 const SkRect bounds = this->getBounds(); 70 const SkRect bounds = this->getBounds();
71 SkCanvas* canvas = recorder.beginRecording(bounds, NULL, 0); 71 SkCanvas* canvas = recorder.beginRecording(bounds, NULL, 0);
72 this->draw(canvas); 72 this->draw(canvas);
73 if (false) { 73 if (false) {
74 draw_bbox(canvas, bounds); 74 draw_bbox(canvas, bounds);
75 } 75 }
76 return recorder.endRecording(); 76 return recorder.endRecording();
77 } 77 }
OLDNEW
« no previous file with comments | « src/core/SkDeviceProfile.cpp ('k') | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698