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

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

Issue 1834303003: Delete SkFlattenable::Type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 8 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/core/SkRasterizer.h ('k') | include/core/SkXfermode.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 * 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 #ifndef SkShader_DEFINED 8 #ifndef SkShader_DEFINED
9 #define SkShader_DEFINED 9 #define SkShader_DEFINED
10 10
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 /** 449 /**
450 * If this shader can be represented by another shader + a localMatrix, ret urn that shader 450 * If this shader can be represented by another shader + a localMatrix, ret urn that shader
451 * and, if not NULL, the localMatrix. If not, return NULL and ignore the lo calMatrix parameter. 451 * and, if not NULL, the localMatrix. If not, return NULL and ignore the lo calMatrix parameter.
452 * 452 *
453 * Note: the returned shader (if not NULL) will have been ref'd, and it is the responsibility 453 * Note: the returned shader (if not NULL) will have been ref'd, and it is the responsibility
454 * of the caller to balance that with unref() when they are done. 454 * of the caller to balance that with unref() when they are done.
455 */ 455 */
456 virtual SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const; 456 virtual SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const;
457 457
458 SK_TO_STRING_VIRT() 458 SK_TO_STRING_VIRT()
459 SK_DEFINE_FLATTENABLE_TYPE(SkShader)
460 459
461 protected: 460 protected:
462 void flatten(SkWriteBuffer&) const override; 461 void flatten(SkWriteBuffer&) const override;
463 462
464 bool computeTotalInverse(const ContextRec&, SkMatrix* totalInverse) const; 463 bool computeTotalInverse(const ContextRec&, SkMatrix* totalInverse) const;
465 464
466 /** 465 /**
467 * Your subclass must also override contextSize() if it overrides onCreateC ontext(). 466 * Your subclass must also override contextSize() if it overrides onCreateC ontext().
468 * Base class impl returns NULL. 467 * Base class impl returns NULL.
469 */ 468 */
(...skipping 19 matching lines...) Expand all
489 SkMatrix fLocalMatrix; 488 SkMatrix fLocalMatrix;
490 489
491 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 490 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
492 friend class SkLocalMatrixShader; 491 friend class SkLocalMatrixShader;
493 friend class SkBitmapProcShader; // for computeTotalInverse() 492 friend class SkBitmapProcShader; // for computeTotalInverse()
494 493
495 typedef SkFlattenable INHERITED; 494 typedef SkFlattenable INHERITED;
496 }; 495 };
497 496
498 #endif 497 #endif
OLDNEW
« no previous file with comments | « include/core/SkRasterizer.h ('k') | include/core/SkXfermode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698