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

Side by Side Diff: ui/compositor/layer.h

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, 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_COMPOSITOR_LAYER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_H_
6 #define UI_COMPOSITOR_LAYER_H_ 6 #define UI_COMPOSITOR_LAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR. 314 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR.
315 void SetColor(SkColor color); 315 void SetColor(SkColor color);
316 SkColor GetTargetColor(); 316 SkColor GetTargetColor();
317 SkColor background_color() const; 317 SkColor background_color() const;
318 318
319 // Updates the nine patch layer's image, aperture and border. May only be 319 // Updates the nine patch layer's image, aperture and border. May only be
320 // called for LAYER_NINE_PATCH. 320 // called for LAYER_NINE_PATCH.
321 void UpdateNinePatchLayerImage(const gfx::ImageSkia& image); 321 void UpdateNinePatchLayerImage(const gfx::ImageSkia& image);
322 void UpdateNinePatchLayerAperture(const gfx::Rect& aperture_in_dip); 322 void UpdateNinePatchLayerAperture(const gfx::Rect& aperture_in_dip);
323 void UpdateNinePatchLayerBorder(const gfx::Rect& border); 323 void UpdateNinePatchLayerBorder(const gfx::Rect& border);
324 // Updates the area completely occluded by another layer, this can be an
325 // empty rectangle if nothing is occluded.
326 void UpdateNinePatchOcclusion(const gfx::Rect& occlusion);
324 327
325 // Adds |invalid_rect| to the Layer's pending invalid rect and calls 328 // Adds |invalid_rect| to the Layer's pending invalid rect and calls
326 // ScheduleDraw(). Returns false if the paint request is ignored. 329 // ScheduleDraw(). Returns false if the paint request is ignored.
327 bool SchedulePaint(const gfx::Rect& invalid_rect); 330 bool SchedulePaint(const gfx::Rect& invalid_rect);
328 331
329 // Schedules a redraw of the layer tree at the compositor. 332 // Schedules a redraw of the layer tree at the compositor.
330 // Note that this _does not_ invalidate any region of this layer; use 333 // Note that this _does not_ invalidate any region of this layer; use
331 // SchedulePaint() for that. 334 // SchedulePaint() for that.
332 void ScheduleDraw(); 335 void ScheduleDraw();
333 336
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 // The texture scale. 532 // The texture scale.
530 float texture_x_scale_; 533 float texture_x_scale_;
531 float texture_y_scale_; 534 float texture_y_scale_;
532 535
533 DISALLOW_COPY_AND_ASSIGN(Layer); 536 DISALLOW_COPY_AND_ASSIGN(Layer);
534 }; 537 };
535 538
536 } // namespace ui 539 } // namespace ui
537 540
538 #endif // UI_COMPOSITOR_LAYER_H_ 541 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698