OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |