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

Unified Diff: components/scheduler/renderer/renderer_scheduler.h

Issue 2093983002: scheduler: Tell v8 about the current RAIL mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: components/scheduler/renderer/renderer_scheduler.h
diff --git a/components/scheduler/renderer/renderer_scheduler.h b/components/scheduler/renderer/renderer_scheduler.h
index c6116ea79bdaa61abb4c5e48d3d6257ec6c66103..ea461e06dcd50367cdc40e09970e0871770f846d 100644
--- a/components/scheduler/renderer/renderer_scheduler.h
+++ b/components/scheduler/renderer/renderer_scheduler.h
@@ -31,6 +31,10 @@ class WebLocalFrame;
class WebThread;
}
+namespace v8 {
+class Isolate;
+}
+
namespace scheduler {
class RenderWidgetSchedulingState;
@@ -43,37 +47,6 @@ class SCHEDULER_EXPORT RendererScheduler : public ChildScheduler {
// Returns the compositor task runner.
virtual scoped_refptr<TaskQueue> CompositorTaskRunner() = 0;
- // Keep RendererScheduler::UseCaseToString in sync with this enum.
- enum class UseCase {
- // No active use case detected.
- NONE,
- // A continuous gesture (e.g., scroll, pinch) which is being driven by the
- // compositor thread.
- COMPOSITOR_GESTURE,
- // An unspecified touch gesture which is being handled by the main thread.
- // Note that since we don't have a full view of the use case, we should be
- // careful to prioritize all work equally.
- MAIN_THREAD_CUSTOM_INPUT_HANDLING,
- // A continuous gesture (e.g., scroll, pinch) which is being driven by the
- // compositor thread but also observed by the main thread. An example is
- // synchronized scrolling where a scroll listener on the main thread changes
- // page layout based on the current scroll position.
- SYNCHRONIZED_GESTURE,
- // A gesture has recently started and we are about to run main thread touch
- // listeners to find out the actual gesture type. To minimize touch latency,
- // only input handling work should run in this state.
- TOUCHSTART,
- // The page is loading.
- LOADING,
- // A continuous gesture (e.g., scroll) which is being handled by the main
- // thread.
- MAIN_THREAD_GESTURE,
- // Must be the last entry.
- USE_CASE_COUNT,
- FIRST_USE_CASE = NONE,
- };
- static const char* UseCaseToString(UseCase use_case);
-
// Creates a WebThread implementation for the renderer main thread.
virtual std::unique_ptr<blink::WebThread> CreateMainThread() = 0;
@@ -191,6 +164,9 @@ class SCHEDULER_EXPORT RendererScheduler : public ChildScheduler {
virtual void SetTopLevelBlameContext(
base::trace_event::BlameContext* blame_context) = 0;
+ // Set the main thread's V8 isolate. Used for controlling v8's RAIL mode.
+ virtual void SetMainThreadIsolate(v8::Isolate* isolate) = 0;
+
protected:
RendererScheduler();
DISALLOW_COPY_AND_ASSIGN(RendererScheduler);

Powered by Google App Engine
This is Rietveld 408576698