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

Unified Diff: ui/compositor/compositor.h

Issue 738983002: Move output surface fallback from cc to embedders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years 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 | « mojo/services/html_viewer/weblayertreeview_impl.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 5d9d793db4fd42110e8c732e03be418a8b96d23c..249ff7cda34ed7fdafdd904cdf2f64b66498f30e 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -74,7 +74,7 @@ class COMPOSITOR_EXPORT ContextFactory {
bool software_fallback) = 0;
// Creates a reflector that copies the content of the |mirrored_compositor|
- // onto |mirroing_layer|.
+ // onto |mirroring_layer|.
virtual scoped_refptr<Reflector> CreateReflector(
Compositor* mirrored_compositor,
Layer* mirroring_layer) = 0;
@@ -257,8 +257,9 @@ class COMPOSITOR_EXPORT Compositor
void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
float page_scale,
float top_controls_delta) override {}
- void RequestNewOutputSurface(bool fallback) override;
- void DidInitializeOutputSurface() override {}
+ void RequestNewOutputSurface() override;
+ void DidInitializeOutputSurface() override;
+ void DidFailToInitializeOutputSurface() override;
void WillCommit() override {}
void DidCommit() override;
void DidCommitAndDrawFrame() override;
@@ -291,6 +292,11 @@ class COMPOSITOR_EXPORT Compositor
friend class base::RefCounted<Compositor>;
friend class CompositorLock;
+ enum {
+ OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK = 4,
+ MAX_OUTPUT_SURFACE_RETRIES = 5,
+ };
+
// Called by CompositorLock.
void UnlockCompositor();
@@ -327,6 +333,8 @@ class COMPOSITOR_EXPORT Compositor
int last_started_frame_;
int last_ended_frame_;
+ int num_failed_recreate_attempts_;
+
bool disable_schedule_composite_;
CompositorLock* compositor_lock_;
« no previous file with comments | « mojo/services/html_viewer/weblayertreeview_impl.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698