OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 #ifndef TestingSpecialImageAccess_DEFINED | 8 #ifndef TestingSpecialImageAccess_DEFINED |
9 #define TestingSpecialImageAccess_DEFINED | 9 #define TestingSpecialImageAccess_DEFINED |
10 | 10 |
11 class TestingSpecialImageAccess { | 11 class TestingSpecialImageAccess { |
12 public: | 12 public: |
13 static const SkIRect& Subset(const SkSpecialImage* img) { | 13 static const SkIRect& Subset(const SkSpecialImage* img) { |
14 return img->subset(); | 14 return img->subset(); |
15 } | 15 } |
16 | 16 |
17 static bool PeekPixels(const SkSpecialImage* img, SkPixmap* pixmap) { | 17 static bool PeekPixels(const SkSpecialImage* img, SkPixmap* pixmap) { |
18 return img->peekPixels(pixmap); | 18 return img->testingOnlyPeekPixels(pixmap); |
19 } | 19 } |
20 | 20 |
21 static GrTexture* PeekTexture(const SkSpecialImage* img) { | 21 static GrTexture* PeekTexture(const SkSpecialImage* img) { |
22 return img->peekTexture(); | 22 return img->peekTexture(); |
23 } | 23 } |
24 | 24 |
25 static bool GetROPixels(const SkSpecialImage* img, SkBitmap* result) { | 25 static bool GetROPixels(const SkSpecialImage* img, SkBitmap* result) { |
26 return img->testingOnlyGetROPixels(result); | 26 return img->testingOnlyGetROPixels(result); |
27 } | 27 } |
28 }; | 28 }; |
29 | 29 |
30 #endif | 30 #endif |
OLD | NEW |