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 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkImage.h" | 10 #include "SkImage.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 desc.fHeight = kFullSize; | 136 desc.fHeight = kFullSize; |
137 | 137 |
138 SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(de
sc, false, | 138 SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(de
sc, false, |
139 bm
.getPixels(), 0)); | 139 bm
.getPixels(), 0)); |
140 if (!texture) { | 140 if (!texture) { |
141 return; | 141 return; |
142 } | 142 } |
143 | 143 |
144 const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmaller
Size); | 144 const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmaller
Size); |
145 | 145 |
146 SkAutoTUnref<SkSpecialImage> img(SkSpecialImage::NewFromGpu(subset, texture)
); | 146 SkAutoTUnref<SkSpecialImage> img(SkSpecialImage::NewFromGpu(subset, |
| 147 kNeedNewImageUni
queID_SpecialImage, |
| 148 texture)); |
147 test_image(img, reporter, false, true); | 149 test_image(img, reporter, false, true); |
148 } | 150 } |
149 | 151 |
150 #endif | 152 #endif |
OLD | NEW |