Commit 71ad9d98 authored by Fernando Serboncini's avatar Fernando Serboncini Committed by Commit Bot

Remove IsGpuCompositingEnabled from CRC creation



TBR=zakerinasab@chromium.org

Bug: 903101,840371
Change-Id: I855ea360aefab4aae00b991f1000fa55e3f49935
Reviewed-on: https://chromium-review.googlesource.com/c/1336079
Commit-Queue: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608080}
parent 192e3bba
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "third_party/blink/renderer/core/origin_trials/origin_trials.h" #include "third_party/blink/renderer/core/origin_trials/origin_trials.h"
#include "third_party/blink/renderer/core/workers/worker_animation_frame_provider.h" #include "third_party/blink/renderer/core/workers/worker_animation_frame_provider.h"
#include "third_party/blink/renderer/core/workers/worker_global_scope.h" #include "third_party/blink/renderer/core/workers/worker_global_scope.h"
#include "third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h" #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h" #include "third_party/blink/renderer/platform/weborigin/security_origin.h"
...@@ -48,16 +47,14 @@ CanvasRenderingContext::CanvasRenderingContext( ...@@ -48,16 +47,14 @@ CanvasRenderingContext::CanvasRenderingContext(
// For wide gamut color spaces, user must explicitly request half float // For wide gamut color spaces, user must explicitly request half float
// storage. Otherwise, we fall back to sRGB in uint8. Invalid requests fall // storage. Otherwise, we fall back to sRGB in uint8. Invalid requests fall
// back to sRGB in uint8 too. // back to sRGB in uint8 too.
if (SharedGpuContext::IsGpuCompositingEnabled()) { if (creation_attributes_.pixel_format == kF16CanvasPixelFormatName) {
if (creation_attributes_.pixel_format == kF16CanvasPixelFormatName) { color_params_.SetCanvasPixelFormat(kF16CanvasPixelFormat);
color_params_.SetCanvasPixelFormat(kF16CanvasPixelFormat); if (creation_attributes_.color_space == kLinearRGBCanvasColorSpaceName)
if (creation_attributes_.color_space == kLinearRGBCanvasColorSpaceName) color_params_.SetCanvasColorSpace(kLinearRGBCanvasColorSpace);
color_params_.SetCanvasColorSpace(kLinearRGBCanvasColorSpace); if (creation_attributes_.color_space == kRec2020CanvasColorSpaceName)
if (creation_attributes_.color_space == kRec2020CanvasColorSpaceName) color_params_.SetCanvasColorSpace(kRec2020CanvasColorSpace);
color_params_.SetCanvasColorSpace(kRec2020CanvasColorSpace); else if (creation_attributes_.color_space == kP3CanvasColorSpaceName)
else if (creation_attributes_.color_space == kP3CanvasColorSpaceName) color_params_.SetCanvasColorSpace(kP3CanvasColorSpace);
color_params_.SetCanvasColorSpace(kP3CanvasColorSpace);
}
} }
if (!creation_attributes_.alpha) if (!creation_attributes_.alpha)
......
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