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

Unified Diff: cc/paint/paint_flags.h

Issue 2768143002: Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: cc/paint/paint_flags.h
diff --git a/cc/paint/paint_flags.h b/cc/paint/paint_flags.h
index b7e96c68e2ec48f4a5e9505a7c5ce3e3e1372aee..37b460d6bda362ebe2dcb7efa9ecac7133174319 100644
--- a/cc/paint/paint_flags.h
+++ b/cc/paint/paint_flags.h
@@ -7,7 +7,6 @@
#include "base/compiler_specific.h"
#include "cc/paint/paint_export.h"
-#include "cc/paint/paint_shader.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkDrawLooper.h"
@@ -19,6 +18,8 @@
namespace cc {
+using PaintShader = SkShader;
+
class CC_PAINT_EXPORT PaintFlags {
public:
enum Style {
@@ -198,6 +199,14 @@ class CC_PAINT_EXPORT PaintFlags {
return paint_.computeFastBounds(orig, storage);
}
+ bool operator==(const PaintFlags& flags) { return flags.paint_ == paint_; }
+ bool operator!=(const PaintFlags& flags) { return flags.paint_ != paint_; }
+
+ // Returns true if this just represents an opacity blend when
+ // used as saveLayer flags.
+ bool IsSimpleOpacity() const;
+ bool SupportsFoldingAlpha() const;
+
private:
friend const SkPaint& ToSkPaint(const PaintFlags& flags);
friend const SkPaint* ToSkPaint(const PaintFlags* flags);
« no previous file with comments | « cc/paint/paint_canvas.h ('k') | cc/paint/paint_flags.cc » ('j') | cc/paint/paint_op_buffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698