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

Side by Side Diff: src/animator/SkDrawShader.cpp

Issue 1772463002: use Make instead of Create to return a shared shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: partial update of skia call-sites 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkDrawShader.h" 10 #include "SkDrawShader.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 SkShader* SkDrawBitmapShader::getShader() { 64 SkShader* SkDrawBitmapShader::getShader() {
65 if (image == nullptr) 65 if (image == nullptr)
66 return nullptr; 66 return nullptr;
67 67
68 // note: bitmap shader now supports independent tile modes for X and Y 68 // note: bitmap shader now supports independent tile modes for X and Y
69 // we pass the same to both, but later we should extend this flexibility 69 // we pass the same to both, but later we should extend this flexibility
70 // to the xml (e.g. tileModeX="repeat" tileModeY="clmap") 70 // to the xml (e.g. tileModeX="repeat" tileModeY="clmap")
71 // 71 //
72 // oops, bitmapshader no longer takes filterBitmap, but deduces it at 72 // oops, bitmapshader no longer takes filterBitmap, but deduces it at
73 // draw-time from the paint 73 // draw-time from the paint
74 return SkShader::CreateBitmapShader(image->fBitmap, 74 return SkShader::MakeBitmapShader(image->fBitmap,
75 (SkShader::TileMode) tileMode, 75 (SkShader::TileMode) tileMode,
76 (SkShader::TileMode) tileMode, 76 (SkShader::TileMode) tileMode,
77 getMatrix()); 77 getMatrix()).release();
78 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698