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

Unified Diff: gm/tiledscaledbitmap.cpp

Issue 1789633002: more shader-->sp conversions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: gm/tiledscaledbitmap.cpp
diff --git a/gm/tiledscaledbitmap.cpp b/gm/tiledscaledbitmap.cpp
index daecbb05e23ce1d0ac34aada9e66b283b97565dd..d74d40bf49610051605ac3c4a81a74ff0fbb9aeb 100644
--- a/gm/tiledscaledbitmap.cpp
+++ b/gm/tiledscaledbitmap.cpp
@@ -1,10 +1,10 @@
-
/*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
#include "gm.h"
#include "Resources.h"
@@ -14,7 +14,6 @@
#include "SkShader.h"
#include "SkStream.h"
-
/***
*
* This GM reproduces Skia bug 2904, in which a tiled bitmap shader was failing to draw correctly
@@ -64,10 +63,8 @@ protected:
mat.setScale(121.f/360.f, 93.f/288.f);
mat.postTranslate(-72, -72);
- SkShader *shader = SkShader::CreateBitmapShader(fBitmap, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &mat);
- paint.setShader(shader);
-
- SkSafeUnref(shader);
+ paint.setShader(SkShader::MakeBitmapShader(fBitmap, SkShader::kRepeat_TileMode,
+ SkShader::kRepeat_TileMode, &mat));
canvas->drawRectCoords(8,8,1008, 608, paint);
}
« gm/pictureshadertile.cpp ('K') | « gm/texturedomaineffect.cpp ('k') | gm/tilemodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698