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

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

Issue 1789443002: Revert "Revert of add Make variations to return SkImage by sk_sp (patchset #5 id:80001 of https://c… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use get, not release, when calling legacy function that wants ptr Created 4 years, 9 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/SkImage.h ('k') | src/c/sk_surface.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 #ifndef SkShader_DEFINED 8 #ifndef SkShader_DEFINED
9 #define SkShader_DEFINED 9 #define SkShader_DEFINED
10 10
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 * successfully creating a picture shader. 404 * successfully creating a picture shader.
405 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection. 405 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection.
406 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection. 406 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection.
407 * @param tile The tile rectangle in picture coordinates: this represents t he subset 407 * @param tile The tile rectangle in picture coordinates: this represents t he subset
408 * (or superset) of the picture used when building a tile. It i s not 408 * (or superset) of the picture used when building a tile. It i s not
409 * affected by localMatrix and does not imply scaling (only tra nslation 409 * affected by localMatrix and does not imply scaling (only tra nslation
410 * and cropping). If null, the tile rect is considered equal to the picture 410 * and cropping). If null, the tile rect is considered equal to the picture
411 * bounds. 411 * bounds.
412 * @return Returns a new shader object. Note: this function never retur ns null. 412 * @return Returns a new shader object. Note: this function never retur ns null.
413 */ 413 */
414 static sk_sp<SkShader> MakePictureShader(sk_sp<const SkPicture> src, TileMod e tmx, TileMode tmy, 414 static sk_sp<SkShader> MakePictureShader(sk_sp<SkPicture> src, TileMode tmx, TileMode tmy,
415 const SkMatrix* localMatrix, const SkRect* tile); 415 const SkMatrix* localMatrix, const SkRect* tile);
416 416
417 /** 417 /**
418 * If this shader can be represented by another shader + a localMatrix, ret urn that shader 418 * If this shader can be represented by another shader + a localMatrix, ret urn that shader
419 * and, if not NULL, the localMatrix. If not, return NULL and ignore the lo calMatrix parameter. 419 * and, if not NULL, the localMatrix. If not, return NULL and ignore the lo calMatrix parameter.
420 * 420 *
421 * Note: the returned shader (if not NULL) will have been ref'd, and it is the responsibility 421 * Note: the returned shader (if not NULL) will have been ref'd, and it is the responsibility
422 * of the caller to balance that with unref() when they are done. 422 * of the caller to balance that with unref() when they are done.
423 */ 423 */
424 virtual SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const; 424 virtual SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 SkMatrix fLocalMatrix; 457 SkMatrix fLocalMatrix;
458 458
459 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 459 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
460 friend class SkLocalMatrixShader; 460 friend class SkLocalMatrixShader;
461 friend class SkBitmapProcShader; // for computeTotalInverse() 461 friend class SkBitmapProcShader; // for computeTotalInverse()
462 462
463 typedef SkFlattenable INHERITED; 463 typedef SkFlattenable INHERITED;
464 }; 464 };
465 465
466 #endif 466 #endif
OLDNEW
« no previous file with comments | « include/core/SkImage.h ('k') | src/c/sk_surface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698