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

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

Issue 1329083004: Comments: note existance of SkImage::newShader next to CreateBitmapShader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 * 392 *
393 * @param src The bitmap to use inside the shader 393 * @param src The bitmap to use inside the shader
394 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection. 394 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection.
395 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection. 395 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection.
396 * @return Returns a new shader object. Note: this function never retur ns null. 396 * @return Returns a new shader object. Note: this function never retur ns null.
397 */ 397 */
398 static SkShader* CreateBitmapShader(const SkBitmap& src, 398 static SkShader* CreateBitmapShader(const SkBitmap& src,
399 TileMode tmx, TileMode tmy, 399 TileMode tmx, TileMode tmy,
400 const SkMatrix* localMatrix = NULL); 400 const SkMatrix* localMatrix = NULL);
401 401
402 // NOTE: You can create an SkImage Shader with SkImage::newShader().
403
402 /** Call this to create a new shader that will draw with the specified pictu re. 404 /** Call this to create a new shader that will draw with the specified pictu re.
403 * 405 *
404 * @param src The picture to use inside the shader (if not NULL, its ref c ount 406 * @param src The picture to use inside the shader (if not NULL, its ref c ount
405 * is incremented). The SkPicture must not be changed after 407 * is incremented). The SkPicture must not be changed after
406 * successfully creating a picture shader. 408 * successfully creating a picture shader.
407 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection. 409 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection.
408 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection. 410 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection.
409 * @param tile The tile rectangle in picture coordinates: this represents t he subset 411 * @param tile The tile rectangle in picture coordinates: this represents t he subset
410 * (or superset) of the picture used when building a tile. It i s not 412 * (or superset) of the picture used when building a tile. It i s not
411 * affected by localMatrix and does not imply scaling (only tra nslation 413 * affected by localMatrix and does not imply scaling (only tra nslation
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 // constructors. 459 // constructors.
458 SkMatrix fLocalMatrix; 460 SkMatrix fLocalMatrix;
459 461
460 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 462 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
461 friend class SkLocalMatrixShader; 463 friend class SkLocalMatrixShader;
462 464
463 typedef SkFlattenable INHERITED; 465 typedef SkFlattenable INHERITED;
464 }; 466 };
465 467
466 #endif 468 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698