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

Unified Diff: cc/resources/layer_quad.h

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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
« no previous file with comments | « cc/resources/gpu_rasterizer.cc ('k') | cc/resources/layer_quad.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/layer_quad.h
diff --git a/cc/resources/layer_quad.h b/cc/resources/layer_quad.h
index ed1db101a9737119fe14799931335a5c686768c0..74336453683f4c94dffc589e5e5145e07c455180 100644
--- a/cc/resources/layer_quad.h
+++ b/cc/resources/layer_quad.h
@@ -22,7 +22,7 @@ class CC_EXPORT LayerQuad {
public:
class Edge {
public:
- Edge() : x_(0), y_(0), z_(0) {}
+ Edge() : x_(0), y_(0), z_(0), degenerate_(false) {}
Edge(const gfx::PointF& p, const gfx::PointF& q);
float x() const { return x_; }
@@ -57,6 +57,8 @@ class CC_EXPORT LayerQuad {
}
void scale(float s) { scale(s, s, s); }
+ bool degenerate() const { return degenerate_; }
+
gfx::PointF Intersect(const Edge& e) const {
return gfx::PointF(
(y() * e.z() - e.y() * z()) / (x() * e.y() - e.x() * y()),
@@ -67,6 +69,7 @@ class CC_EXPORT LayerQuad {
float x_;
float y_;
float z_;
+ bool degenerate_;
};
LayerQuad(const Edge& left,
« no previous file with comments | « cc/resources/gpu_rasterizer.cc ('k') | cc/resources/layer_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698