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

Side by Side Diff: gm/bleed.cpp

Issue 1728093005: Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add aliases for Chrome Created 4 years, 9 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
« no previous file with comments | « experimental/fiddle/fiddle_main.cpp ('k') | gm/dftext.cpp » ('j') | 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 2013 Google Inc. 2 * Copyright 2013 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 "gm.h" 8 #include "gm.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 scanline = (PIXEL_TYPE*)((char*)scanline + rowBytes); 229 scanline = (PIXEL_TYPE*)((char*)scanline + rowBytes);
230 for (int x = 0; x < width + kXPad; ++x) { 230 for (int x = 0; x < width + kXPad; ++x) {
231 scanline[x] = padColor; 231 scanline[x] = padColor;
232 } 232 }
233 } 233 }
234 234
235 GrSurfaceDesc desc; 235 GrSurfaceDesc desc;
236 desc.fConfig = config; 236 desc.fConfig = config;
237 desc.fWidth = width + kXPad; 237 desc.fWidth = width + kXPad;
238 desc.fHeight = height + kYPad; 238 desc.fHeight = height + kYPad;
239 SkAutoTUnref<GrTexture> texture(ctx->textureProvider()->createTexture(desc, true, pixels.get(), 239 SkAutoTUnref<GrTexture> texture(ctx->textureProvider()->createTexture(
240 rowByt es)); 240 desc, SkBudgeted::kYes, pixels.get(), rowBytes));
241 241
242 if (!texture) { 242 if (!texture) {
243 return false; 243 return false;
244 } 244 }
245 245
246 GrWrapTextureInBitmap(texture, width, height, true, &result->fBitmap); 246 GrWrapTextureInBitmap(texture, width, height, true, &result->fBitmap);
247 result->fType = TestPixels::kBitmap; 247 result->fType = TestPixels::kBitmap;
248 result->fBitmap.setImmutable(); 248 result->fBitmap.setImmutable();
249 result->fRect.set(2, 2, width, height); 249 result->fRect.set(2, 2, width, height);
250 return true; 250 return true;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 596
597 DEF_GM( return new BleedGM(kUseBitmap_BleedTest); ) 597 DEF_GM( return new BleedGM(kUseBitmap_BleedTest); )
598 DEF_GM( return new BleedGM(kUseTextureBitmap_BleedTest); ) 598 DEF_GM( return new BleedGM(kUseTextureBitmap_BleedTest); )
599 DEF_GM( return new BleedGM(kUseImage_BleedTest); ) 599 DEF_GM( return new BleedGM(kUseImage_BleedTest); )
600 DEF_GM( return new BleedGM(kUseAlphaBitmap_BleedTest); ) 600 DEF_GM( return new BleedGM(kUseAlphaBitmap_BleedTest); )
601 DEF_GM( return new BleedGM(kUseAlphaTextureBitmap_BleedTest); ) 601 DEF_GM( return new BleedGM(kUseAlphaTextureBitmap_BleedTest); )
602 DEF_GM( return new BleedGM(kUseAlphaImage_BleedTest); ) 602 DEF_GM( return new BleedGM(kUseAlphaImage_BleedTest); )
603 DEF_GM( return new BleedGM(kUseAlphaBitmapShader_BleedTest); ) 603 DEF_GM( return new BleedGM(kUseAlphaBitmapShader_BleedTest); )
604 DEF_GM( return new BleedGM(kUseAlphaTextureBitmapShader_BleedTest); ) 604 DEF_GM( return new BleedGM(kUseAlphaTextureBitmapShader_BleedTest); )
605 DEF_GM( return new BleedGM(kUseAlphaImageShader_BleedTest); ) 605 DEF_GM( return new BleedGM(kUseAlphaImageShader_BleedTest); )
OLDNEW
« no previous file with comments | « experimental/fiddle/fiddle_main.cpp ('k') | gm/dftext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698