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

Unified Diff: ui/views/view.h

Issue 1773393002: Address some bubble clipping issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no aa Created 4 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 | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index adc31ccac0a40eed84390ae3a4cd69f4b6daa3e6..83d8601da811a35df2a0ba11017565dd0f0f47d2 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -35,6 +35,7 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/path.h"
#include "ui/views/view_targeter.h"
#include "ui/views/views_export.h"
@@ -298,8 +299,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
gfx::Transform GetTransform() const;
- // Clipping parameters. Clipping is done relative to the view bounds.
- void set_clip_insets(gfx::Insets clip_insets) { clip_insets_ = clip_insets; }
+ // Clipping is done relative to the view's local bounds.
+ void set_clip_path(const gfx::Path& path) { clip_path_ = path; }
// Sets the transform to the supplied transform.
void SetTransform(const gfx::Transform& transform);
@@ -1485,9 +1486,9 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Transformations -----------------------------------------------------------
- // Clipping parameters. skia transformation matrix does not give us clipping.
- // So we do it ourselves.
- gfx::Insets clip_insets_;
+ // Painting will be clipped to this path. TODO(estade): this doesn't work for
+ // layers.
+ gfx::Path clip_path_;
// Layout --------------------------------------------------------------------
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698