| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #ifndef GrDrawState_DEFINED | 8 #ifndef GrDrawState_DEFINED |
| 9 #define GrDrawState_DEFINED | 9 #define GrDrawState_DEFINED |
| 10 | 10 |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 SkMatrix inverse; | 296 SkMatrix inverse; |
| 297 if (fViewMatrix.invert(&inverse)) { | 297 if (fViewMatrix.invert(&inverse)) { |
| 298 if (matrix) { | 298 if (matrix) { |
| 299 *matrix = inverse; | 299 *matrix = inverse; |
| 300 } | 300 } |
| 301 return true; | 301 return true; |
| 302 } | 302 } |
| 303 return false; | 303 return false; |
| 304 } | 304 } |
| 305 | 305 |
| 306 /** | |
| 307 * Sets the view matrix to identity and updates any installed effects to com
pensate for the | |
| 308 * coord system change. | |
| 309 */ | |
| 310 bool setIdentityViewMatrix(); | |
| 311 | |
| 312 //////////////////////////////////////////////////////////////////////////// | 306 //////////////////////////////////////////////////////////////////////////// |
| 313 | 307 |
| 314 /** | 308 /** |
| 315 * Preconcats the current view matrix and restores the previous view matrix
in the destructor. | 309 * Preconcats the current view matrix and restores the previous view matrix
in the destructor. |
| 316 * Effect matrices are automatically adjusted to compensate and adjusted bac
k in the destructor. | 310 * Effect matrices are automatically adjusted to compensate and adjusted bac
k in the destructor. |
| 317 */ | 311 */ |
| 318 class AutoViewMatrixRestore : public ::SkNoncopyable { | 312 class AutoViewMatrixRestore : public ::SkNoncopyable { |
| 319 public: | 313 public: |
| 320 AutoViewMatrixRestore() : fDrawState(NULL) {} | 314 AutoViewMatrixRestore() : fDrawState(NULL) {} |
| 321 | 315 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 mutable bool fCoverageProcInfoValid; | 541 mutable bool fCoverageProcInfoValid; |
| 548 mutable GrColor fColorCache; | 542 mutable GrColor fColorCache; |
| 549 mutable GrColor fCoverageCache; | 543 mutable GrColor fCoverageCache; |
| 550 mutable const GrPrimitiveProcessor* fColorPrimProc; | 544 mutable const GrPrimitiveProcessor* fColorPrimProc; |
| 551 mutable const GrPrimitiveProcessor* fCoveragePrimProc; | 545 mutable const GrPrimitiveProcessor* fCoveragePrimProc; |
| 552 | 546 |
| 553 friend class GrOptDrawState; | 547 friend class GrOptDrawState; |
| 554 }; | 548 }; |
| 555 | 549 |
| 556 #endif | 550 #endif |
| OLD | NEW |