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

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

Issue 1272293004: Move SkTemplates.h to private. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: It's a struct! Created 5 years, 4 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 | « include/xml/SkDOM.h ('k') | src/codec/SkJpegDecoderMgr.h » ('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 /* 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"
11 #include "SkDrawBitmap.h" 11 #include "SkDrawBitmap.h"
12 #include "SkDrawMatrix.h" 12 #include "SkDrawMatrix.h"
13 #include "SkDrawPaint.h" 13 #include "SkDrawPaint.h"
14 #include "SkTemplates.h"
15 14
16 #if SK_USE_CONDENSED_INFO == 0 15 #if SK_USE_CONDENSED_INFO == 0
17 16
18 const SkMemberInfo SkDrawShader::fInfo[] = { 17 const SkMemberInfo SkDrawShader::fInfo[] = {
19 SK_MEMBER(matrix, Matrix), 18 SK_MEMBER(matrix, Matrix),
20 SK_MEMBER(tileMode, TileMode) 19 SK_MEMBER(tileMode, TileMode)
21 }; 20 };
22 21
23 #endif 22 #endif
24 23
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 SkShader* SkDrawBitmapShader::getShader() { 64 SkShader* SkDrawBitmapShader::getShader() {
66 if (image == NULL) 65 if (image == NULL)
67 return NULL; 66 return NULL;
68 67
69 // 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
70 // 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
71 // to the xml (e.g. tileModeX="repeat" tileModeY="clmap") 70 // to the xml (e.g. tileModeX="repeat" tileModeY="clmap")
72 // 71 //
73 // oops, bitmapshader no longer takes filterBitmap, but deduces it at 72 // oops, bitmapshader no longer takes filterBitmap, but deduces it at
74 // draw-time from the paint 73 // draw-time from the paint
75 SkShader* shader = SkShader::CreateBitmapShader(image->fBitmap, 74 return SkShader::CreateBitmapShader(image->fBitmap,
76 (SkShader::TileMode) tileMod e, 75 (SkShader::TileMode) tileMode,
77 (SkShader::TileMode) tileMod e, 76 (SkShader::TileMode) tileMode,
78 getMatrix()); 77 getMatrix());
79 SkAutoTDelete<SkShader> autoDel(shader);
80 (void)autoDel.detach();
81 return shader;
82 } 78 }
OLDNEW
« no previous file with comments | « include/xml/SkDOM.h ('k') | src/codec/SkJpegDecoderMgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698