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

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

Issue 238253005: Fixes for SkPictureShader. (Closed) Base URL: https://skia.googlesource.com/skia.git@shaders
Patch Set: Rebase Created 6 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 | « gyp/tests.gypi ('k') | src/core/SkPictureShader.cpp » ('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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection. 342 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection.
343 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection. 343 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection.
344 * @return Returns a new shader object. Note: this function never retur ns null. 344 * @return Returns a new shader object. Note: this function never retur ns null.
345 */ 345 */
346 static SkShader* CreateBitmapShader(const SkBitmap& src, 346 static SkShader* CreateBitmapShader(const SkBitmap& src,
347 TileMode tmx, TileMode tmy); 347 TileMode tmx, TileMode tmy);
348 348
349 /** Call this to create a new shader that will draw with the specified pictu re. 349 /** Call this to create a new shader that will draw with the specified pictu re.
350 * 350 *
351 * @param src The picture to use inside the shader (if not NULL, its ref c ount 351 * @param src The picture to use inside the shader (if not NULL, its ref c ount
352 * is incremented). 352 * is incremented). The SkPicture must not be changed after
353 * successfully creating a picture shader.
354 * FIXME: src cannot be const due to SkCanvas::drawPicture
353 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection. 355 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection.
354 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection. 356 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection.
355 * @return Returns a new shader object. Note: this function never retur ns null. 357 * @return Returns a new shader object. Note: this function never retur ns null.
356 */ 358 */
357 static SkShader* CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy); 359 static SkShader* CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy);
358 360
359 SK_TO_STRING_VIRT() 361 SK_TO_STRING_VIRT()
360 SK_DEFINE_FLATTENABLE_TYPE(SkShader) 362 SK_DEFINE_FLATTENABLE_TYPE(SkShader)
361 363
362 protected: 364 protected:
(...skipping 15 matching lines...) Expand all
378 SkMatrix fLocalMatrix; 380 SkMatrix fLocalMatrix;
379 SkMatrix fTotalInverse; 381 SkMatrix fTotalInverse;
380 uint8_t fPaintAlpha; 382 uint8_t fPaintAlpha;
381 uint8_t fTotalInverseClass; 383 uint8_t fTotalInverseClass;
382 SkDEBUGCODE(SkBool8 fInSetContext;) 384 SkDEBUGCODE(SkBool8 fInSetContext;)
383 385
384 typedef SkFlattenable INHERITED; 386 typedef SkFlattenable INHERITED;
385 }; 387 };
386 388
387 #endif 389 #endif
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698