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

Unified Diff: gm/tiledscaledbitmap.cpp

Issue 1790353002: Revert of 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
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | gm/tilemodes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/tiledscaledbitmap.cpp
diff --git a/gm/tiledscaledbitmap.cpp b/gm/tiledscaledbitmap.cpp
index d74d40bf49610051605ac3c4a81a74ff0fbb9aeb..daecbb05e23ce1d0ac34aada9e66b283b97565dd 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"
@@ -13,6 +13,7 @@
#include "SkPaint.h"
#include "SkShader.h"
#include "SkStream.h"
+
/***
*
@@ -63,8 +64,10 @@
mat.setScale(121.f/360.f, 93.f/288.f);
mat.postTranslate(-72, -72);
- paint.setShader(SkShader::MakeBitmapShader(fBitmap, SkShader::kRepeat_TileMode,
- SkShader::kRepeat_TileMode, &mat));
+ SkShader *shader = SkShader::CreateBitmapShader(fBitmap, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &mat);
+ paint.setShader(shader);
+
+ SkSafeUnref(shader);
canvas->drawRectCoords(8,8,1008, 608, paint);
}
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | gm/tilemodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698