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

Side by Side Diff: include/core/SkShader.h

Issue 299043002: re-expose hasLocalMatrix for now (can't hurt) -- unblocks blink (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 7
8 8
9 #ifndef SkShader_DEFINED 9 #ifndef SkShader_DEFINED
10 #define SkShader_DEFINED 10 #define SkShader_DEFINED
(...skipping 25 matching lines...) Expand all
36 SK_DECLARE_INST_COUNT(SkShader) 36 SK_DECLARE_INST_COUNT(SkShader)
37 37
38 SkShader(const SkMatrix* localMatrix = NULL); 38 SkShader(const SkMatrix* localMatrix = NULL);
39 virtual ~SkShader(); 39 virtual ~SkShader();
40 40
41 /** 41 /**
42 * Returns the local matrix. 42 * Returns the local matrix.
43 */ 43 */
44 const SkMatrix& getLocalMatrix() const { return fLocalMatrix; } 44 const SkMatrix& getLocalMatrix() const { return fLocalMatrix; }
45 45
46 #ifdef SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX
47 /** 46 /**
48 * Returns true if the local matrix is not an identity matrix. 47 * Returns true if the local matrix is not an identity matrix.
49 */ 48 */
50 bool hasLocalMatrix() const { return !fLocalMatrix.isIdentity(); } 49 bool hasLocalMatrix() const { return !fLocalMatrix.isIdentity(); }
51 50
51 #ifdef SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX
52 /** 52 /**
53 * Set the shader's local matrix. 53 * Set the shader's local matrix.
54 * @param localM The shader's new local matrix. 54 * @param localM The shader's new local matrix.
55 */ 55 */
56 void setLocalMatrix(const SkMatrix& localM) { fLocalMatrix = localM; } 56 void setLocalMatrix(const SkMatrix& localM) { fLocalMatrix = localM; }
57 57
58 /** 58 /**
59 * Reset the shader's local matrix to identity. 59 * Reset the shader's local matrix to identity.
60 */ 60 */
61 void resetLocalMatrix() { fLocalMatrix.reset(); } 61 void resetLocalMatrix() { fLocalMatrix.reset(); }
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 */ 461 */
462 virtual Context* onCreateContext(const ContextRec&, void* storage) const; 462 virtual Context* onCreateContext(const ContextRec&, void* storage) const;
463 463
464 private: 464 private:
465 SkMatrix fLocalMatrix; 465 SkMatrix fLocalMatrix;
466 466
467 typedef SkFlattenable INHERITED; 467 typedef SkFlattenable INHERITED;
468 }; 468 };
469 469
470 #endif 470 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698