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

Unified Diff: cc/quads/draw_polygon.h

Issue 2136493002: Perform BSP polygon splitting and orientation selection in a single step. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Remove all test changes. Created 4 years, 5 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/output/bsp_tree_unittest.cc ('k') | cc/quads/draw_polygon.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/draw_polygon.h
diff --git a/cc/quads/draw_polygon.h b/cc/quads/draw_polygon.h
index b3bde398c5556533d80deba71f0c030f64e8be30..2dc642cde3195cd8beb47c74b72476cfb9ba1a5f 100644
--- a/cc/quads/draw_polygon.h
+++ b/cc/quads/draw_polygon.h
@@ -40,14 +40,11 @@ class CC_EXPORT DrawPolygon {
// Split will only return true if it determines that we got back 2
// intersection points. Only when it returns true will front and back both be
// valid new polygons that are on opposite sides of the splitting plane.
- bool Split(const DrawPolygon& splitter,
- std::unique_ptr<DrawPolygon>* front,
- std::unique_ptr<DrawPolygon>* back);
+ void SplitPolygon(std::unique_ptr<DrawPolygon> polygon,
+ std::unique_ptr<DrawPolygon>* front,
+ std::unique_ptr<DrawPolygon>* back,
+ bool* is_coplanar) const;
float SignedPointDistance(const gfx::Point3F& point) const;
- // Checks polygon a against polygon b and returns which side it lies on, or
- // whether it crosses (necessitating a split in the BSP tree).
- static BspCompareResult SideCompare(const DrawPolygon& a,
- const DrawPolygon& b);
void ToQuads2D(std::vector<gfx::QuadF>* quads) const;
void TransformToScreenSpace(const gfx::Transform& transform);
void TransformToLayerSpace(const gfx::Transform& inverse_transform);
« no previous file with comments | « cc/output/bsp_tree_unittest.cc ('k') | cc/quads/draw_polygon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698