Commit ba6b00e5 authored by Hajime Hoshi's avatar Hajime Hoshi Committed by Commit Bot

Replace TaskType::kUnthrottled with kInternalDefault in WebGL classes

The task runner is used at HandlePendingEventsAndPromises, and I think
an unthorttled task runner is not necessary here.

WebGLSync:
The unthrottled task runenr was introduced at https://chromium-review.googlesource.com/c/chromium/src/+/906402

WebGLQuery and WebGLTimerQueryExt:
The unthrottled task runner was introduced at https://codereview.chromium.org/2341043002

We plan to eliminate kUnthrottled, kUnspecedTimer and kUnspecedLoading
and replace them with appropriate kInternal* task types.

Task type guideline: https://bit.ly/2vMAsQ4

Bug: 836410
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I2cc48425aaef973432f8bdee6fbb111b0e9a9188
Reviewed-on: https://chromium-review.googlesource.com/1055369Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558214}
parent 10d1f7ac
......@@ -23,7 +23,7 @@ WebGLQuery::WebGLQuery(WebGL2RenderingContextBase* ctx)
query_result_(0) {
if (ctx->canvas()) {
task_runner_ =
ctx->canvas()->GetDocument().GetTaskRunner(TaskType::kUnthrottled);
ctx->canvas()->GetDocument().GetTaskRunner(TaskType::kInternalDefault);
} else {
// Fallback for OffscreenCanvas (no frame scheduler)
task_runner_ = Platform::Current()->CurrentThread()->GetTaskRunner();
......
......@@ -20,7 +20,7 @@ WebGLSync::WebGLSync(WebGL2RenderingContextBase* ctx,
object_type_(object_type) {
if (ctx->canvas()) {
task_runner_ =
ctx->canvas()->GetDocument().GetTaskRunner(TaskType::kUnthrottled);
ctx->canvas()->GetDocument().GetTaskRunner(TaskType::kInternalDefault);
} else {
// Fallback for OffscreenCanvas (no frame scheduler)
task_runner_ = Platform::Current()->CurrentThread()->GetTaskRunner();
......
......@@ -22,8 +22,8 @@ WebGLTimerQueryEXT::WebGLTimerQueryEXT(WebGLRenderingContextBase* ctx)
can_update_availability_(false),
query_result_available_(false),
query_result_(0),
task_runner_(
ctx->canvas()->GetDocument().GetTaskRunner(TaskType::kUnthrottled)) {
task_runner_(ctx->canvas()->GetDocument().GetTaskRunner(
TaskType::kInternalDefault)) {
Context()->ContextGL()->GenQueriesEXT(1, &query_id_);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment