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

Side by Side Diff: gm/bleed.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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 | « dm/DMSrcSink.cpp ('k') | gm/colorfilterimagefilter.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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(desc, true, pixels.get(),
240 rowByt es)); 240 rowByt es));
241 241
242 if (!texture) { 242 if (!texture) {
243 return false; 243 return false;
244 } 244 }
245 245
246 texture->setFromRawPixels(true);
247 texture->setException(true);
248
246 GrWrapTextureInBitmap(texture, width, height, true, &result->fBitmap); 249 GrWrapTextureInBitmap(texture, width, height, true, &result->fBitmap);
247 result->fType = TestPixels::kBitmap; 250 result->fType = TestPixels::kBitmap;
248 result->fBitmap.setImmutable(); 251 result->fBitmap.setImmutable();
249 result->fRect.set(2, 2, width, height); 252 result->fRect.set(2, 2, width, height);
250 return true; 253 return true;
251 #else 254 #else
252 return false; 255 return false;
253 #endif 256 #endif
254 } 257 }
255 258
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 599
597 DEF_GM( return new BleedGM(kUseBitmap_BleedTest); ) 600 DEF_GM( return new BleedGM(kUseBitmap_BleedTest); )
598 DEF_GM( return new BleedGM(kUseTextureBitmap_BleedTest); ) 601 DEF_GM( return new BleedGM(kUseTextureBitmap_BleedTest); )
599 DEF_GM( return new BleedGM(kUseImage_BleedTest); ) 602 DEF_GM( return new BleedGM(kUseImage_BleedTest); )
600 DEF_GM( return new BleedGM(kUseAlphaBitmap_BleedTest); ) 603 DEF_GM( return new BleedGM(kUseAlphaBitmap_BleedTest); )
601 DEF_GM( return new BleedGM(kUseAlphaTextureBitmap_BleedTest); ) 604 DEF_GM( return new BleedGM(kUseAlphaTextureBitmap_BleedTest); )
602 DEF_GM( return new BleedGM(kUseAlphaImage_BleedTest); ) 605 DEF_GM( return new BleedGM(kUseAlphaImage_BleedTest); )
603 DEF_GM( return new BleedGM(kUseAlphaBitmapShader_BleedTest); ) 606 DEF_GM( return new BleedGM(kUseAlphaBitmapShader_BleedTest); )
604 DEF_GM( return new BleedGM(kUseAlphaTextureBitmapShader_BleedTest); ) 607 DEF_GM( return new BleedGM(kUseAlphaTextureBitmapShader_BleedTest); )
605 DEF_GM( return new BleedGM(kUseAlphaImageShader_BleedTest); ) 608 DEF_GM( return new BleedGM(kUseAlphaImageShader_BleedTest); )
OLDNEW
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | gm/colorfilterimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698