OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkImage_Base.h" | 8 #include "SkImage_Base.h" |
9 #include "SkImagePriv.h" | 9 #include "SkImagePriv.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 do { | 24 do { |
25 id = sk_atomic_inc(&gUniqueID) + 1; | 25 id = sk_atomic_inc(&gUniqueID) + 1; |
26 } while (0 == id); | 26 } while (0 == id); |
27 return id; | 27 return id; |
28 } | 28 } |
29 | 29 |
30 void SkImage::draw(SkCanvas* canvas, SkScalar x, SkScalar y, | 30 void SkImage::draw(SkCanvas* canvas, SkScalar x, SkScalar y, |
31 const SkPaint* paint) { | 31 const SkPaint* paint) { |
32 asIB(this)->onDraw(canvas, x, y, paint); | 32 asIB(this)->onDraw(canvas, x, y, paint); |
33 } | 33 } |
| 34 |
| 35 GrTexture* SkImage::getTexture() { |
| 36 return asIB(this)->onGetTexture(); |
| 37 } |
| 38 |
OLD | NEW |