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

Unified Diff: ui/compositor/paint_context.h

Issue 2849953004: SV Test
Patch Set: Created 3 years, 8 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/compositor/layer.cc ('k') | ui/compositor/paint_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/paint_context.h
diff --git a/ui/compositor/paint_context.h b/ui/compositor/paint_context.h
index b9c51dd386a3dca5caf7daa4d15ea1a541f18511..e4cbf7c0b6593088c7b6969ae65783d77968e714 100644
--- a/ui/compositor/paint_context.h
+++ b/ui/compositor/paint_context.h
@@ -65,6 +65,18 @@ class COMPOSITOR_EXPORT PaintContext {
const gfx::Rect& InvalidationForTesting() const { return invalidation_; }
+ float device_scale_factor() const { return device_scale_factor_; }
+
+ gfx::Rect GetPixelBounds(const gfx::Rect& bounds) const;
+
+ gfx::Vector2dF CanvasScale() const;
+
+ void UpdateSizeAndDSF(const gfx::Size& pixel_size, const gfx::Size& size);
+
+ const gfx::Size& pixel_size() const { return pixel_size_; }
+
+ const gfx::Size& size() const { return size_; }
+
private:
// The Recorder classes need access to the internal canvas and friends, but we
// don't want to expose them on this class so that people must go through the
@@ -90,9 +102,6 @@ class COMPOSITOR_EXPORT PaintContext {
// which this was copied from. We expect a copied-from PaintContext to outlive
// copies made from it.
cc::PaintRecorder* recorder_;
- // The device scale of the frame being painted. Used to determine which bitmap
- // resources to use in the frame.
- float device_scale_factor_;
// Invalidation in the space of the paint root (ie the space of the layer
// backing the paint taking place).
gfx::Rect invalidation_;
@@ -100,6 +109,13 @@ class COMPOSITOR_EXPORT PaintContext {
// |invalidation_|.
gfx::Vector2d offset_;
+ gfx::Size pixel_size_;
+ gfx::Size size_;
+
+ // The device scale of the frame being painted. Used to determine which bitmap
+ // resources to use in the frame.
+ float device_scale_factor_;
+
#if DCHECK_IS_ON()
// Used to verify that the |invalidation_| is only used to compare against
// rects in the same space.
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/compositor/paint_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698