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

Unified Diff: ui/compositor/layer.cc

Issue 2083083004: cc: nine patch: add occlusion support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for hidpi screens Created 4 years, 6 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: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index dabbedd73eee8b0fd00f885268d448f95fb36341..d4f0131edce320c63640447cd7eb1a4074e35aa5 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -649,10 +649,16 @@ void Layer::UpdateNinePatchLayerAperture(const gfx::Rect& aperture_in_dip) {
}
void Layer::UpdateNinePatchLayerBorder(const gfx::Rect& border) {
- DCHECK(type_ == LAYER_NINE_PATCH && nine_patch_layer_.get());
+ DCHECK_EQ(type_, LAYER_NINE_PATCH);
+ DCHECK(nine_patch_layer_.get());
nine_patch_layer_->SetBorder(border);
}
+void Layer::UpdateNinePatchOcclusion(const gfx::Rect& occlusion) {
+ DCHECK(type_ == LAYER_NINE_PATCH && nine_patch_layer_.get());
+ nine_patch_layer_->SetLayerOcclusion(occlusion);
+}
+
void Layer::SetColor(SkColor color) { GetAnimator()->SetColor(color); }
SkColor Layer::GetTargetColor() {
@@ -832,6 +838,7 @@ void Layer::StackRelativeTo(Layer* child, Layer* other, bool above) {
above ?
(child_i < other_i ? other_i : other_i + 1) :
(child_i < other_i ? other_i - 1 : other_i);
+
children_.erase(children_.begin() + child_i);
children_.insert(children_.begin() + dest_i, child);

Powered by Google App Engine
This is Rietveld 408576698