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

Side by Side Diff: src/core/SkDraw.cpp

Issue 1724503002: Add dest type hint to SkShader::ContextRec (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | tests/SkColor4fTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | tests/SkColor4fTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698