OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 #define __STDC_LIMIT_MACROS | 7 #define __STDC_LIMIT_MACROS |
8 | 8 |
9 #include "SkDraw.h" | 9 #include "SkDraw.h" |
10 #include "SkBlitter.h" | 10 #include "SkBlitter.h" |
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1888 | 1888 |
1889 // setup our state and function pointer for iterating triangles | 1889 // setup our state and function pointer for iterating triangles |
1890 VertState state(count, indices, indexCount); | 1890 VertState state(count, indices, indexCount); |
1891 VertState::Proc vertProc = state.chooseProc(vmode); | 1891 VertState::Proc vertProc = state.chooseProc(vmode); |
1892 | 1892 |
1893 if (textures || colors) { | 1893 if (textures || colors) { |
1894 while (vertProc(&state)) { | 1894 while (vertProc(&state)) { |
1895 if (textures) { | 1895 if (textures) { |
1896 SkMatrix tempM; | 1896 SkMatrix tempM; |
1897 if (texture_to_matrix(state, vertices, textures, &tempM)) { | 1897 if (texture_to_matrix(state, vertices, textures, &tempM)) { |
1898 SkShader::ContextRec rec(p, *fMatrix, &tempM); | 1898 SkShader::ContextRec rec(p, *fMatrix, &tempM, |
| 1899 SkBlitter::PreferredShaderDest(fDst
.info())); |
1899 if (!blitter->resetShaderContext(rec)) { | 1900 if (!blitter->resetShaderContext(rec)) { |
1900 continue; | 1901 continue; |
1901 } | 1902 } |
1902 } | 1903 } |
1903 } | 1904 } |
1904 if (colors) { | 1905 if (colors) { |
1905 // Find the context for triShader. | 1906 // Find the context for triShader. |
1906 SkTriColorShader::TriColorShaderContext* triColorShaderContext; | 1907 SkTriColorShader::TriColorShaderContext* triColorShaderContext; |
1907 | 1908 |
1908 SkShader::Context* shaderContext = blitter->getShaderContext(); | 1909 SkShader::Context* shaderContext = blitter->getShaderContext(); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2055 mask->fImage = SkMask::AllocImage(size); | 2056 mask->fImage = SkMask::AllocImage(size); |
2056 memset(mask->fImage, 0, mask->computeImageSize()); | 2057 memset(mask->fImage, 0, mask->computeImageSize()); |
2057 } | 2058 } |
2058 | 2059 |
2059 if (SkMask::kJustComputeBounds_CreateMode != mode) { | 2060 if (SkMask::kJustComputeBounds_CreateMode != mode) { |
2060 draw_into_mask(*mask, devPath, style); | 2061 draw_into_mask(*mask, devPath, style); |
2061 } | 2062 } |
2062 | 2063 |
2063 return true; | 2064 return true; |
2064 } | 2065 } |
OLD | NEW |