diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-10 16:19:40 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-10 16:01:50 +0000 |
commit | 51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch) | |
tree | 835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/third_party/blink/renderer/platform/graphics/gpu | |
parent | 6036726eb981b6c4b42047513b9d3f4ac865daac (diff) | |
download | qtwebengine-chromium-51f6c2793adab2d864b3d2b360000ef8db1d3e92.tar.gz |
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/graphics/gpu')
3 files changed, 11 insertions, 11 deletions
diff --git a/chromium/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc b/chromium/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc index b04c5675260..45a3ce6496e 100644 --- a/chromium/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc +++ b/chromium/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc @@ -57,7 +57,7 @@ #include "third_party/blink/renderer/platform/runtime_enabled_features.h" #include "third_party/blink/renderer/platform/wtf/functional.h" #include "third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h" -#include "third_party/skia/include/core/SkColorSpaceXform.h" +#include "third_party/skia/include/core/SkPixmap.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrContext.h" #include "third_party/skia/include/gpu/gl/GrGLTypes.h" @@ -1367,15 +1367,15 @@ void DrawingBuffer::ReadBackFramebuffer(unsigned char* pixels, } if (op == WebGLImageConversion::kAlphaDoPremultiply) { - std::unique_ptr<SkColorSpaceXform> xform = - SkColorSpaceXform::New(SkColorSpace::MakeSRGBLinear().get(), - SkColorSpace::MakeSRGBLinear().get()); - SkColorSpaceXform::ColorFormat color_format = - SkColorSpaceXform::ColorFormat::kRGBA_8888_ColorFormat; + auto color_type = kRGBA_8888_SkColorType; if (data_type != GL_UNSIGNED_BYTE) - color_format = SkColorSpaceXform::ColorFormat::kRGBA_F16_ColorFormat; - xform->apply(color_format, pixels, color_format, pixels, width * height, - kPremul_SkAlphaType); + color_type = kRGBA_F16_SkColorType; + const auto src = + SkImageInfo::Make(width, height, color_type, kUnpremul_SkAlphaType); + const auto dst = + SkImageInfo::Make(width, height, color_type, kPremul_SkAlphaType); + SkPixmap{src, pixels, src.minRowBytes()}.readPixels( + SkPixmap{dst, pixels, dst.minRowBytes()}); } else if (op != WebGLImageConversion::kAlphaDoNothing) { NOTREACHED(); } diff --git a/chromium/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer_test_helpers.h b/chromium/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer_test_helpers.h index 5d78f23d032..7f39cc947d5 100644 --- a/chromium/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer_test_helpers.h +++ b/chromium/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer_test_helpers.h @@ -53,7 +53,7 @@ class WebGraphicsContext3DProviderForTests void SetLostContextCallback(base::Closure) override {} void SetErrorMessageCallback( base::RepeatingCallback<void(const char*, int32_t id)>) override {} - cc::ImageDecodeCache* ImageDecodeCache() override { + cc::ImageDecodeCache* ImageDecodeCache(SkColorType) override { return &image_decode_cache_; } diff --git a/chromium/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.cc b/chromium/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.cc index d122cbf8c34..d2b1712d885 100644 --- a/chromium/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.cc +++ b/chromium/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.cc @@ -10,8 +10,8 @@ #include "gpu/config/gpu_feature_info.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/web_graphics_context_3d_provider.h" -#include "third_party/blink/public/platform/web_thread.h" #include "third_party/blink/renderer/platform/cross_thread_functional.h" +#include "third_party/blink/renderer/platform/scheduler/public/thread.h" #include "third_party/blink/renderer/platform/waitable_event.h" #include "third_party/blink/renderer/platform/web_task_runner.h" |