blob: d0a420f383d4ece6a1e77286af0e87c9d5449e8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkXfermodeInterpretation_DEFINED
#define SkXfermodeInterpretation_DEFINED
class SkPaint;
/**
* By analyzing the paint, we may decide we can take special
* action. This enum lists our possible actions.
*/
enum SkXfermodeInterpretation {
kNormal_SkXfermodeInterpretation, //< draw normally
kSrcOver_SkXfermodeInterpretation, //< draw as if in srcover mode
kSkipDrawing_SkXfermodeInterpretation //< draw nothing
};
/**
* Given a paint, determine whether the paint's transfer mode can be
* replaced with kSrcOver_Mode or not drawn at all. This is used by
* SkBlitter and SkPDFDevice.
*/
SkXfermodeInterpretation SkInterpretXfermode(const SkPaint&, bool dstIsOpaque);
#endif // SkXfermodeInterpretation_DEFINED
|