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

Side by Side Diff: tests/SpecialImageTest.cpp

Issue 1705113002: Update SkSpecialImage API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add missing files Created 4 years, 10 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
« src/core/SkSpecialImage.cpp ('K') | « src/core/SkSpecialSurface.cpp ('k') | no next file » | 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 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
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
OLDNEW
« src/core/SkSpecialImage.cpp ('K') | « src/core/SkSpecialSurface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698