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

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

Issue 1853383002: Revert of Delete SkFlattenable::Type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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)
459 460
460 protected: 461 protected:
461 void flatten(SkWriteBuffer&) const override; 462 void flatten(SkWriteBuffer&) const override;
462 463
463 bool computeTotalInverse(const ContextRec&, SkMatrix* totalInverse) const; 464 bool computeTotalInverse(const ContextRec&, SkMatrix* totalInverse) const;
464 465
465 /** 466 /**
466 * Your subclass must also override contextSize() if it overrides onCreateC ontext(). 467 * Your subclass must also override contextSize() if it overrides onCreateC ontext().
467 * Base class impl returns NULL. 468 * Base class impl returns NULL.
468 */ 469 */
(...skipping 19 matching lines...) Expand all
488 SkMatrix fLocalMatrix; 489 SkMatrix fLocalMatrix;
489 490
490 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 491 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
491 friend class SkLocalMatrixShader; 492 friend class SkLocalMatrixShader;
492 friend class SkBitmapProcShader; // for computeTotalInverse() 493 friend class SkBitmapProcShader; // for computeTotalInverse()
493 494
494 typedef SkFlattenable INHERITED; 495 typedef SkFlattenable INHERITED;
495 }; 496 };
496 497
497 #endif 498 #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