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

Unified Diff: ui/compositor/compositor.h

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Sync with ToT Created 3 years, 4 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/canvas_painter.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.h
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 92ed68412880f146245709a908517390ef5a111c..573e654343d9a31fbf382830fa314f2755f423a0 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -194,6 +194,7 @@ class COMPOSITOR_EXPORT Compositor
ui::ContextFactoryPrivate* context_factory_private,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
bool enable_surface_synchronization,
+ bool enable_pixel_canvas,
bool external_begin_frames_enabled = false);
~Compositor() override;
@@ -405,6 +406,9 @@ class COMPOSITOR_EXPORT Compositor
allow_locks_to_extend_timeout_ = allowed;
}
+ // If true, all paint commands are recorded at pixel size instead of DIP.
+ bool is_pixel_canvas() const { return is_pixel_canvas_; }
+
private:
friend class base::RefCounted<Compositor>;
@@ -469,6 +473,8 @@ class COMPOSITOR_EXPORT Compositor
base::TimeTicks scheduled_timeout_;
// If true, the |scheduled_timeout_| might be recalculated and extended.
bool allow_locks_to_extend_timeout_;
+ // If true, all paint commands are recorded at pixel size instead of DIP.
+ const bool is_pixel_canvas_;
base::WeakPtrFactory<Compositor> weak_ptr_factory_;
base::WeakPtrFactory<Compositor> lock_timeout_weak_ptr_factory_;
« no previous file with comments | « ui/compositor/canvas_painter.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698