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

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

Issue 1124003002: Revert of Make drawImage a virtual on SkDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « src/core/SkDevice.cpp ('k') | src/core/SkPaintPriv.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 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;
12 class SkPaint;
13
11 #include "SkTypes.h" 14 #include "SkTypes.h"
12 15
13 class SkBitmap;
14 class SkImage;
15 class SkPaint;
16
17 enum SkPaintBitmapOpacity { 16 enum SkPaintBitmapOpacity {
18 // No content replaces the paint's color 17 // No content replaces the paint's color
19 kNoBitmap_SkPaintBitmapOpacity = 0, 18 kNoBitmap_SkPaintBitmapOpacity = 0,
20 // The color replacement is known to be opaque 19 // The color replacement is known to be opaque
21 kOpaque_SkPaintBitmapOpacity = 1, 20 kOpaque_SkPaintBitmapOpacity = 1,
22 // We have no information about the color or it is transparent 21 // We have no information about the color or it is transparent
23 kUnknown_SkPaintBitmapOpacity = 2 22 kUnknown_SkPaintBitmapOpacity = 2
24 }; 23 };
25 24
26 /** Returns true if draw calls that use the paint will completely occlude 25 /** Returns true if draw calls that use the paint will completely occlude
27 canvas contents that are covered by the draw. 26 canvas contents that are covered by the draw.
28 @param paint The paint to be analyzed, NULL is equivalent to 27 @param paint The paint to be analyzed, NULL is equivalent to
29 the default paint. 28 the default paint.
30 @param contentType The type of the content that will be drawn, 29 @param contentType The type of the content that will be drawn,
31 kNoBitmap_SkPaintBitmapOpacity if there is no content in adition to the paint. 30 kNoBitmap_SkPaintBitmapOpacity if there is no content in adition to the paint.
32 @return true if paint is opaque 31 @return true if paint is opaque
33 */ 32 */
34 bool isPaintOpaque(const SkPaint* paint, SkPaintBitmapOpacity contentType); 33 bool isPaintOpaque(const SkPaint* paint, SkPaintBitmapOpacity contentType);
35 34
36 /** Returns true if draw calls that use the paint will completely occlude 35 /** Returns true if draw calls that use the paint will completely occlude
37 canvas contents that are covered by the draw. 36 canvas contents that are covered by the draw.
38 @param paint The paint to be analyzed, NULL is equivalent to 37 @param paint The paint to be analyzed, NULL is equivalent to
39 the default paint. 38 the default paint.
40 @param bmpReplacesShader a bitmap to be used in place of the paint's 39 @param bmpReplacesShader a bitmap to be used in place of the paint's
41 shader. 40 shader.
42 @return true if paint is opaque 41 @return true if paint is opaque
43 */ 42 */
44 bool isPaintOpaque(const SkPaint* paint, const SkBitmap* bmpReplacesShader = NUL L); 43 bool isPaintOpaque(const SkPaint* paint,
45 bool isPaintOpaque(const SkPaint* paint, const SkImage* image); 44 const SkBitmap* bmpReplacesShader = NULL);
46
47 #endif 45 #endif
OLDNEW
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/core/SkPaintPriv.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698