OLD | NEW |
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" | 8 #include "../private/SkAtomics.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkDrawable.h" | 10 #include "SkDrawable.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 { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 SkPictureRecorder recorder; | 76 SkPictureRecorder recorder; |
77 | 77 |
78 const SkRect bounds = this->getBounds(); | 78 const SkRect bounds = this->getBounds(); |
79 SkCanvas* canvas = recorder.beginRecording(bounds, nullptr, 0); | 79 SkCanvas* canvas = recorder.beginRecording(bounds, nullptr, 0); |
80 this->draw(canvas); | 80 this->draw(canvas); |
81 if (false) { | 81 if (false) { |
82 draw_bbox(canvas, bounds); | 82 draw_bbox(canvas, bounds); |
83 } | 83 } |
84 return recorder.endRecording(); | 84 return recorder.endRecording(); |
85 } | 85 } |
OLD | NEW |