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

Unified Diff: third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h

Issue 2255683005: Determine if OffscreenCanvas is paintable in different rendering contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Canvas2DTypecast
Patch Set: comment Created 4 years, 4 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/platform/graphics/skia/SkiaUtils.h
diff --git a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h
index e4282bba4dbd6a9a87b3b495790cc404410bc392..4ec6dfbad3b246e2000c809f4c2bfd6dc9c9cc19 100644
--- a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h
+++ b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h
@@ -48,6 +48,16 @@ namespace blink {
class GraphicsContext;
+/**** constants ****/
+
+// Firefox limits width/height to 32767 pixels, but slows down dramatically before it
+// reaches that limit. We limit by area instead, giving us larger maximum dimensions,
+// in exchange for a smaller maximum canvas size.
+const int PLATFORM_EXPORT MaxCanvasArea = 32768 * 8192; // Maximum canvas area in CSS pixels
+
+// In Skia, we will also limit width/height to 32767.
+const int PLATFORM_EXPORT MaxSkiaDim = 32767; // Maximum width/height in CSS pixels.
+
SkXfermode::Mode PLATFORM_EXPORT WebCoreCompositeToSkiaComposite(CompositeOperator, WebBlendMode = WebBlendModeNormal);
CompositeOperator PLATFORM_EXPORT compositeOperatorFromSkia(SkXfermode::Mode);
WebBlendMode PLATFORM_EXPORT blendModeFromSkia(SkXfermode::Mode);

Powered by Google App Engine
This is Rietveld 408576698