OLD | NEW |
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 "SkRectShaderImageFilter.h" | 8 #include "SkRectShaderImageFilter.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 SkSafeUnref(paint.setShader(SkShader::CreateLocalMatrixShader(fShader, matri
x))); | 72 SkSafeUnref(paint.setShader(SkShader::CreateLocalMatrixShader(fShader, matri
x))); |
73 | 73 |
74 SkRect rect = SkRect::MakeWH(SkIntToScalar(bounds.width()), SkIntToScalar(bo
unds.height())); | 74 SkRect rect = SkRect::MakeWH(SkIntToScalar(bounds.width()), SkIntToScalar(bo
unds.height())); |
75 canvas.drawRect(rect, paint); | 75 canvas.drawRect(rect, paint); |
76 | 76 |
77 *result = device.get()->accessBitmap(false); | 77 *result = device.get()->accessBitmap(false); |
78 offset->fX = bounds.fLeft; | 78 offset->fX = bounds.fLeft; |
79 offset->fY = bounds.fTop; | 79 offset->fY = bounds.fTop; |
80 return true; | 80 return true; |
81 } | 81 } |
| 82 |
| 83 #ifndef SK_IGNORE_TO_STRING |
| 84 void SkRectShaderImageFilter::toString(SkString* str) const { |
| 85 str->appendf("SkRectShaderImageFilter: ("); |
| 86 str->append(")"); |
| 87 } |
| 88 #endif |
OLD | NEW |