scheduler_settings.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright 2013 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef CC_SCHEDULER_SCHEDULER_SETTINGS_H_
  5. #define CC_SCHEDULER_SCHEDULER_SETTINGS_H_
  6. #include <memory>
  7. #include "base/memory/ref_counted.h"
  8. #include "cc/cc_export.h"
  9. namespace base {
  10. namespace trace_event {
  11. class ConvertableToTraceFormat;
  12. }
  13. }
  14. namespace cc {
  15. class CC_EXPORT SchedulerSettings {
  16. public:
  17. SchedulerSettings();
  18. SchedulerSettings(const SchedulerSettings& other);
  19. ~SchedulerSettings();
  20. // Whether a BeginMainFrame should be issued while there is a pending-tree
  21. // still waiting to be activated. This is disabled by default for the UI
  22. // compositor, and enabled for renderers (unless there are too few cores).
  23. bool main_frame_before_activation_enabled = false;
  24. // Whether commits should happen directly to the active tree, skipping the
  25. // pending tree. This is turned on only for the UI compositor (and in some
  26. // tests).
  27. bool commit_to_active_tree = false;
  28. // This is enabled for android-webview.
  29. bool using_synchronous_renderer_compositor = false;
  30. // Turning this on effectively disables pipelining of compositor frame
  31. // production stages by waiting for each stage to complete before producing
  32. // the frame. This is enabled for headless-mode and some tests, and disabled
  33. // elsewhere by default.
  34. bool wait_for_all_pipeline_stages_before_draw = false;
  35. int maximum_number_of_failed_draws_before_draw_is_forced = 3;
  36. std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
  37. };
  38. } // namespace cc
  39. #endif // CC_SCHEDULER_SCHEDULER_SETTINGS_H_