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

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: enum 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..28028ae8e76574ec561b81be01e399ca2a015ade 100644
--- a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h
+++ b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h
@@ -48,6 +48,18 @@ namespace blink {
class GraphicsContext;
+/**** constants ****/
+
+enum {
+ // 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.
+ kMaxCanvasArea = 32768 * 8192, // Maximum canvas area in CSS pixels
+
+ // In Skia, we will also limit width/height to 32767.
+ kMaxSkiaDim = 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