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

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

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make it run. Created 4 years, 6 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 #ifndef SkShader_DEFINED 8 #ifndef SkShader_DEFINED
9 #define SkShader_DEFINED 9 #define SkShader_DEFINED
10 10
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 * 317 *
318 * The GPU device does not call SkShader::createContext(), instead we pass the view matrix, 318 * The GPU device does not call SkShader::createContext(), instead we pass the view matrix,
319 * local matrix, and filter quality directly. 319 * local matrix, and filter quality directly.
320 * 320 *
321 * The GrContext may be used by the to create textures that are required by the returned 321 * The GrContext may be used by the to create textures that are required by the returned
322 * processor. 322 * processor.
323 * 323 *
324 * The returned GrFragmentProcessor should expect an unpremultiplied input color and 324 * The returned GrFragmentProcessor should expect an unpremultiplied input color and
325 * produce a premultiplied output. 325 * produce a premultiplied output.
326 */ 326 */
327 virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*, 327 virtual sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*,
328 const SkMatrix& viewM atrix, 328 const SkMatrix& viewM atrix,
329 const SkMatrix* local Matrix, 329 const SkMatrix* local Matrix,
330 SkFilterQuality, 330 SkFilterQuality,
331 SkSourceGammaTreatmen t) const; 331 SkSourceGammaTreatmen t) const;
332 332
333 /** 333 /**
334 * If the shader can represent its "average" luminance in a single color, r eturn true and 334 * If the shader can represent its "average" luminance in a single color, r eturn true and
335 * if color is not NULL, return that color. If it cannot, return false and ignore the color 335 * if color is not NULL, return that color. If it cannot, return false and ignore the color
336 * parameter. 336 * parameter.
337 * 337 *
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 SkMatrix fLocalMatrix; 499 SkMatrix fLocalMatrix;
500 500
501 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 501 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
502 friend class SkLocalMatrixShader; 502 friend class SkLocalMatrixShader;
503 friend class SkBitmapProcShader; // for computeTotalInverse() 503 friend class SkBitmapProcShader; // for computeTotalInverse()
504 504
505 typedef SkFlattenable INHERITED; 505 typedef SkFlattenable INHERITED;
506 }; 506 };
507 507
508 #endif 508 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698