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

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

Issue 768183002: Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 8
9 #ifndef SkShader_DEFINED 9 #ifndef SkShader_DEFINED
10 #define SkShader_DEFINED 10 #define SkShader_DEFINED
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 * 472 *
473 * Note: the returned shader (if not NULL) will have been ref'd, and it is the responsibility 473 * Note: the returned shader (if not NULL) will have been ref'd, and it is the responsibility
474 * of the caller to balance that with unref() when they are done. 474 * of the caller to balance that with unref() when they are done.
475 */ 475 */
476 virtual SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const; 476 virtual SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const;
477 477
478 SK_TO_STRING_VIRT() 478 SK_TO_STRING_VIRT()
479 SK_DEFINE_FLATTENABLE_TYPE(SkShader) 479 SK_DEFINE_FLATTENABLE_TYPE(SkShader)
480 480
481 protected: 481 protected:
482 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
483 SkShader(SkReadBuffer& );
484 #endif
482 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 485 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
483 486
484 bool computeTotalInverse(const ContextRec&, SkMatrix* totalInverse) const; 487 bool computeTotalInverse(const ContextRec&, SkMatrix* totalInverse) const;
485 488
486 /** 489 /**
487 * Your subclass must also override contextSize() if it overrides onCreateC ontext(). 490 * Your subclass must also override contextSize() if it overrides onCreateC ontext().
488 * Base class impl returns NULL. 491 * Base class impl returns NULL.
489 */ 492 */
490 virtual Context* onCreateContext(const ContextRec&, void* storage) const; 493 virtual Context* onCreateContext(const ContextRec&, void* storage) const;
491 494
492 virtual bool onAsLuminanceColor(SkColor*) const { 495 virtual bool onAsLuminanceColor(SkColor*) const {
493 return false; 496 return false;
494 } 497 }
495 private: 498 private:
496 // This is essentially const, but not officially so it can be modified in 499 // This is essentially const, but not officially so it can be modified in
497 // constructors. 500 // constructors.
498 SkMatrix fLocalMatrix; 501 SkMatrix fLocalMatrix;
499 502
500 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 503 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
501 friend class SkLocalMatrixShader; 504 friend class SkLocalMatrixShader;
502 505
503 typedef SkFlattenable INHERITED; 506 typedef SkFlattenable INHERITED;
504 }; 507 };
505 508
506 #endif 509 #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