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

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

Issue 260863007: Remove setLocalMatrix calls from picture shader GM. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: pass the localMatrix... Created 6 years, 7 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 | « gm/pictureshader.cpp ('k') | src/core/SkPictureShader.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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 /** Call this to create a new shader that will draw with the specified pictu re. 395 /** Call this to create a new shader that will draw with the specified pictu re.
396 * 396 *
397 * @param src The picture to use inside the shader (if not NULL, its ref c ount 397 * @param src The picture to use inside the shader (if not NULL, its ref c ount
398 * is incremented). The SkPicture must not be changed after 398 * is incremented). The SkPicture must not be changed after
399 * successfully creating a picture shader. 399 * successfully creating a picture shader.
400 * FIXME: src cannot be const due to SkCanvas::drawPicture 400 * FIXME: src cannot be const due to SkCanvas::drawPicture
401 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection. 401 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir ection.
402 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection. 402 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir ection.
403 * @return Returns a new shader object. Note: this function never retur ns null. 403 * @return Returns a new shader object. Note: this function never retur ns null.
404 */ 404 */
405 static SkShader* CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy); 405 static SkShader* CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy,
406 const SkMatrix* localMatrix = NULL);
406 407
407 SK_TO_STRING_VIRT() 408 SK_TO_STRING_VIRT()
408 SK_DEFINE_FLATTENABLE_TYPE(SkShader) 409 SK_DEFINE_FLATTENABLE_TYPE(SkShader)
409 410
410 protected: 411 protected:
411 412
412 SkShader(SkReadBuffer& ); 413 SkShader(SkReadBuffer& );
413 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 414 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
414 415
415 private: 416 private:
416 SkMatrix fLocalMatrix; 417 SkMatrix fLocalMatrix;
417 418
418 bool computeTotalInverse(const SkMatrix& matrix, SkMatrix* totalInverse) con st; 419 bool computeTotalInverse(const SkMatrix& matrix, SkMatrix* totalInverse) con st;
419 420
420 typedef SkFlattenable INHERITED; 421 typedef SkFlattenable INHERITED;
421 }; 422 };
422 423
423 #endif 424 #endif
OLDNEW
« no previous file with comments | « gm/pictureshader.cpp ('k') | src/core/SkPictureShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698