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

Unified Diff: ui/compositor/compositor.h

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Unittest update Created 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/compositor/compositor.h
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 94fcfc9c1a5cb0937d108970fdfd9ba41c71aa11..4a75353185be556236642fc8bb8daf5f83827cde 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -188,7 +188,8 @@ class COMPOSITOR_EXPORT Compositor
ui::ContextFactory* context_factory,
ui::ContextFactoryPrivate* context_factory_private,
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
- bool enable_surface_synchronization);
+ bool enable_surface_synchronization,
+ bool enable_pixel_canvas = false);
danakj 2017/07/25 17:58:56 Can you avoid default parameter values?
malaykeshav 2017/07/25 22:57:57 Done
~Compositor() override;
ui::ContextFactory* context_factory() { return context_factory_; }
@@ -375,6 +376,8 @@ class COMPOSITOR_EXPORT Compositor
allow_locks_to_extend_timeout_ = allowed;
}
+ bool is_pixel_canvas() const { return is_pixel_canvas_; }
+
private:
friend class base::RefCounted<Compositor>;
@@ -435,6 +438,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.
danakj 2017/07/25 17:58:56 Can you also comment on the accessor method?
malaykeshav 2017/07/25 22:57:57 Done
+ bool is_pixel_canvas_;
danakj 2017/07/25 17:58:56 const
malaykeshav 2017/07/25 22:57:57 Done
base::WeakPtrFactory<Compositor> weak_ptr_factory_;
base::WeakPtrFactory<Compositor> lock_timeout_weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698