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

Side by Side Diff: src/core/SkPaintPriv.h

Issue 920513003: Make filters use SkImage instead of SkBitmap Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 SkPaintPriv_DEFINED 8 #ifndef SkPaintPriv_DEFINED
9 #define SkPaintPriv_DEFINED 9 #define SkPaintPriv_DEFINED
10 10
11 class SkBitmap; 11 class SkBitmap;
12 class SkImage;
12 class SkPaint; 13 class SkPaint;
13 14
14 #include "SkTypes.h" 15 #include "SkTypes.h"
15 16
16 enum SkPaintBitmapOpacity { 17 enum SkPaintBitmapOpacity {
17 // No content replaces the paint's color 18 // No content replaces the paint's color
18 kNoBitmap_SkPaintBitmapOpacity = 0, 19 kNoBitmap_SkPaintBitmapOpacity = 0,
19 // The color replacement is known to be opaque 20 // The color replacement is known to be opaque
20 kOpaque_SkPaintBitmapOpacity = 1, 21 kOpaque_SkPaintBitmapOpacity = 1,
21 // We have no information about the color or it is transparent 22 // We have no information about the color or it is transparent
(...skipping 13 matching lines...) Expand all
35 /** Returns true if draw calls that use the paint will completely occlude 36 /** Returns true if draw calls that use the paint will completely occlude
36 canvas contents that are covered by the draw. 37 canvas contents that are covered by the draw.
37 @param paint The paint to be analyzed, NULL is equivalent to 38 @param paint The paint to be analyzed, NULL is equivalent to
38 the default paint. 39 the default paint.
39 @param bmpReplacesShader a bitmap to be used in place of the paint's 40 @param bmpReplacesShader a bitmap to be used in place of the paint's
40 shader. 41 shader.
41 @return true if paint is opaque 42 @return true if paint is opaque
42 */ 43 */
43 bool isPaintOpaque(const SkPaint* paint, 44 bool isPaintOpaque(const SkPaint* paint,
44 const SkBitmap* bmpReplacesShader = NULL); 45 const SkBitmap* bmpReplacesShader = NULL);
46
47 /** Returns true if draw calls that use the paint will completely occlude
48 canvas contents that are covered by the draw.
49 @param paint The paint to be analyzed, NULL is equivalent to
50 the default paint.
51 @param imageReplacesShader a image to be used in place of the paint's
52 shader.
53 @return true if paint is opaque
54 */
55 bool isPaintOpaque(const SkPaint* paint,
56 const SkImage* imageReplacesShader);
57
45 #endif 58 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698