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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)
Patch Set: Created 3 years, 11 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: 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);

Powered by Google App Engine
This is Rietveld 408576698