Bug 1044102 - Part 1 - Implement ImageBitmap. r=roc, sr=smaug

This commit is contained in:
Kaku Kuo
2015-07-30 20:47:00 +02:00
parent b8ce8e4968
commit 0c5a16e20e
14 changed files with 1372 additions and 0 deletions

View File

@@ -749,9 +749,12 @@ GetCanvasContextType(const nsAString& str, CanvasContextType* const out_type)
static already_AddRefed<nsICanvasRenderingContextInternal>
CreateContextForCanvas(CanvasContextType contextType, HTMLCanvasElement* canvas)
{
MOZ_ASSERT(contextType != CanvasContextType::NoContext);
nsRefPtr<nsICanvasRenderingContextInternal> ret;
switch (contextType) {
case CanvasContextType::NoContext:
break;
case CanvasContextType::Canvas2D:
Telemetry::Accumulate(Telemetry::CANVAS_2D_USED, 1);
ret = new CanvasRenderingContext2D();