| Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| index 26c1d6f7aa326d79ccca002a2898f625eecd84ec..b7e9c71ed0f63806747e9b03d6cfec9fce3adf60 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| @@ -897,7 +897,8 @@ HTMLCanvasElement::createWebGLImageBufferSurface(OpacityMode opacityMode) {
|
| // then make a non-accelerated ImageBuffer. This means copying the internal
|
| // Image will require a pixel readback, but that is unavoidable in this case.
|
| auto surface = WTF::wrapUnique(new AcceleratedImageBufferSurface(
|
| - size(), opacityMode, m_context->skColorSpace(), m_context->colorType()));
|
| + size(), opacityMode, m_context->skSurfaceColorSpace(),
|
| + m_context->colorType()));
|
| if (surface->isValid())
|
| return std::move(surface);
|
| return nullptr;
|
| @@ -928,8 +929,8 @@ HTMLCanvasElement::createAcceleratedImageBufferSurface(
|
| std::unique_ptr<ImageBufferSurface> surface =
|
| WTF::wrapUnique(new Canvas2DImageBufferSurface(
|
| std::move(contextProvider), size(), *msaaSampleCount, opacityMode,
|
| - Canvas2DLayerBridge::EnableAcceleration, m_context->skColorSpace(),
|
| - m_context->colorType()));
|
| + Canvas2DLayerBridge::EnableAcceleration, m_context->gfxColorSpace(),
|
| + m_context->skSurfaceColorSpace(), m_context->colorType()));
|
| if (!surface->isValid()) {
|
| CanvasMetrics::countCanvasContextUsage(
|
| CanvasMetrics::GPUAccelerated2DCanvasImageBufferCreationFailed);
|
| @@ -947,7 +948,7 @@ HTMLCanvasElement::createUnacceleratedImageBufferSurface(
|
| if (shouldUseDisplayList()) {
|
| auto surface = WTF::wrapUnique(new RecordingImageBufferSurface(
|
| size(), WTF::wrapUnique(new UnacceleratedSurfaceFactory), opacityMode,
|
| - m_context->skColorSpace(), m_context->colorType()));
|
| + m_context->skSurfaceColorSpace(), m_context->colorType()));
|
| if (surface->isValid()) {
|
| CanvasMetrics::countCanvasContextUsage(
|
| CanvasMetrics::DisplayList2DCanvasImageBufferCreated);
|
| @@ -958,8 +959,9 @@ HTMLCanvasElement::createUnacceleratedImageBufferSurface(
|
| }
|
|
|
| auto surfaceFactory = WTF::makeUnique<UnacceleratedSurfaceFactory>();
|
| - auto surface = surfaceFactory->createSurface(
|
| - size(), opacityMode, m_context->skColorSpace(), m_context->colorType());
|
| + auto surface = surfaceFactory->createSurface(size(), opacityMode,
|
| + m_context->skSurfaceColorSpace(),
|
| + m_context->colorType());
|
| if (surface->isValid()) {
|
| CanvasMetrics::countCanvasContextUsage(
|
| CanvasMetrics::Unaccelerated2DCanvasImageBufferCreated);
|
|
|