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

Side by Side Diff: cc/paint/paint_flags.cc

Issue 2820133005: Revert of Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: Created 3 years, 8 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 | « cc/paint/paint_flags.h ('k') | cc/paint/paint_image.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/paint/paint_flags.h"
6
7 namespace cc {
8
9 bool PaintFlags::IsSimpleOpacity() const {
10 uint32_t color = getColor();
11 if (SK_ColorTRANSPARENT != SkColorSetA(color, SK_AlphaTRANSPARENT))
12 return false;
13 if (!isSrcOver())
14 return false;
15 if (getLooper())
16 return false;
17 if (getPathEffect())
18 return false;
19 if (getShader())
20 return false;
21 if (getMaskFilter())
22 return false;
23 if (getColorFilter())
24 return false;
25 if (getImageFilter())
26 return false;
27 return true;
28 }
29
30 bool PaintFlags::SupportsFoldingAlpha() const {
31 if (!isSrcOver())
32 return false;
33 if (getColorFilter())
34 return false;
35 if (getImageFilter())
36 return false;
37 if (getLooper())
38 return false;
39 return true;
40 }
41
42 } // namespace cc
OLDNEW
« no previous file with comments | « cc/paint/paint_flags.h ('k') | cc/paint/paint_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698