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

Unified Diff: ui/gfx/skia_util.cc

Issue 595593002: Splitting of layers for correct intersections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« cc/quads/draw_polygon.cc ('K') | « ui/gfx/skia_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skia_util.cc
diff --git a/ui/gfx/skia_util.cc b/ui/gfx/skia_util.cc
index 0a991df20aa56630b5d969badd717e2bed7a445b..45abb72e85f9e6288283675a27ae2b3d5b49b158 100644
--- a/ui/gfx/skia_util.cc
+++ b/ui/gfx/skia_util.cc
@@ -12,6 +12,7 @@
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "third_party/skia/include/effects/SkLayerDrawLooper.h"
#include "ui/gfx/image/image_skia_rep.h"
+#include "ui/gfx/quad_f.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_f.h"
#include "ui/gfx/shadow_value.h"
@@ -190,4 +191,11 @@ void ConvertSkiaToRGBA(const unsigned char* skia,
}
}
+void QuadFToSkPoints(const gfx::QuadF& quad, SkPoint points[4]) {
+ points[0] = SkPoint::Make(quad.p1().x(), quad.p1().y());
+ points[1] = SkPoint::Make(quad.p2().x(), quad.p2().y());
+ points[2] = SkPoint::Make(quad.p3().x(), quad.p3().y());
+ points[3] = SkPoint::Make(quad.p4().x(), quad.p4().y());
+}
+
} // namespace gfx
« cc/quads/draw_polygon.cc ('K') | « ui/gfx/skia_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698