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

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

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: original write flags were fine Created 6 years, 10 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
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 kPerspective_MatrixClass // slow perspective, need to mappoints e ach pixel 356 kPerspective_MatrixClass // slow perspective, need to mappoints e ach pixel
357 }; 357 };
358 static MatrixClass ComputeMatrixClass(const SkMatrix&); 358 static MatrixClass ComputeMatrixClass(const SkMatrix&);
359 359
360 // These can be called by your subclass after setContext() has been called 360 // These can be called by your subclass after setContext() has been called
361 uint8_t getPaintAlpha() const { return fPaintAlpha; } 361 uint8_t getPaintAlpha() const { return fPaintAlpha; }
362 SkBitmap::Config getDeviceConfig() const { return (SkBitmap::Config)fDevi ceConfig; } 362 SkBitmap::Config getDeviceConfig() const { return (SkBitmap::Config)fDevi ceConfig; }
363 const SkMatrix& getTotalInverse() const { return fTotalInverse; } 363 const SkMatrix& getTotalInverse() const { return fTotalInverse; }
364 MatrixClass getInverseClass() const { return (MatrixClass)fTotalInve rseClass; } 364 MatrixClass getInverseClass() const { return (MatrixClass)fTotalInve rseClass; }
365 365
366 SkShader(SkFlattenableReadBuffer& ); 366 SkShader(SkReadBuffer& );
367 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 367 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
368 private: 368 private:
369 SkMatrix fLocalMatrix; 369 SkMatrix fLocalMatrix;
370 SkMatrix fTotalInverse; 370 SkMatrix fTotalInverse;
371 uint8_t fPaintAlpha; 371 uint8_t fPaintAlpha;
372 uint8_t fDeviceConfig; 372 uint8_t fDeviceConfig;
373 uint8_t fTotalInverseClass; 373 uint8_t fTotalInverseClass;
374 SkDEBUGCODE(SkBool8 fInSetContext;) 374 SkDEBUGCODE(SkBool8 fInSetContext;)
375 375
376 static SkShader* CreateBitmapShader(const SkBitmap& src, 376 static SkShader* CreateBitmapShader(const SkBitmap& src,
377 TileMode, TileMode, 377 TileMode, TileMode,
378 void* storage, size_t storageSize); 378 void* storage, size_t storageSize);
379 friend class SkAutoBitmapShaderInstall; 379 friend class SkAutoBitmapShaderInstall;
380 typedef SkFlattenable INHERITED; 380 typedef SkFlattenable INHERITED;
381 }; 381 };
382 382
383 #endif 383 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698