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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2495373003: Match html canvas which is transferred to OffscreenCanvas to CSS style (Closed)
Patch Set: spelling error Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "core/html/HTMLSelectElement.h" 47 #include "core/html/HTMLSelectElement.h"
48 #include "core/html/ImageData.h" 48 #include "core/html/ImageData.h"
49 #include "core/html/canvas/CanvasAsyncBlobCreator.h" 49 #include "core/html/canvas/CanvasAsyncBlobCreator.h"
50 #include "core/html/canvas/CanvasContextCreationAttributes.h" 50 #include "core/html/canvas/CanvasContextCreationAttributes.h"
51 #include "core/html/canvas/CanvasFontCache.h" 51 #include "core/html/canvas/CanvasFontCache.h"
52 #include "core/html/canvas/CanvasRenderingContext.h" 52 #include "core/html/canvas/CanvasRenderingContext.h"
53 #include "core/html/canvas/CanvasRenderingContextFactory.h" 53 #include "core/html/canvas/CanvasRenderingContextFactory.h"
54 #include "core/imagebitmap/ImageBitmapOptions.h" 54 #include "core/imagebitmap/ImageBitmapOptions.h"
55 #include "core/layout/HitTestCanvasResult.h" 55 #include "core/layout/HitTestCanvasResult.h"
56 #include "core/layout/LayoutHTMLCanvas.h" 56 #include "core/layout/LayoutHTMLCanvas.h"
57 #include "core/layout/api/LayoutViewItem.h"
58 #include "core/layout/compositing/PaintLayerCompositor.h"
57 #include "core/paint/PaintLayer.h" 59 #include "core/paint/PaintLayer.h"
58 #include "core/paint/PaintTiming.h" 60 #include "core/paint/PaintTiming.h"
59 #include "platform/Histogram.h" 61 #include "platform/Histogram.h"
60 #include "platform/RuntimeEnabledFeatures.h" 62 #include "platform/RuntimeEnabledFeatures.h"
61 #include "platform/graphics/Canvas2DImageBufferSurface.h" 63 #include "platform/graphics/Canvas2DImageBufferSurface.h"
62 #include "platform/graphics/CanvasMetrics.h" 64 #include "platform/graphics/CanvasMetrics.h"
63 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" 65 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h"
64 #include "platform/graphics/ImageBuffer.h" 66 #include "platform/graphics/ImageBuffer.h"
65 #include "platform/graphics/RecordingImageBufferSurface.h" 67 #include "platform/graphics/RecordingImageBufferSurface.h"
66 #include "platform/graphics/StaticBitmapImage.h" 68 #include "platform/graphics/StaticBitmapImage.h"
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 return String(); 1380 return String();
1379 } 1381 }
1380 1382
1381 bool HTMLCanvasElement::createSurfaceLayer() { 1383 bool HTMLCanvasElement::createSurfaceLayer() {
1382 DCHECK(!m_surfaceLayerBridge); 1384 DCHECK(!m_surfaceLayerBridge);
1383 mojom::blink::OffscreenCanvasSurfacePtr service; 1385 mojom::blink::OffscreenCanvasSurfacePtr service;
1384 Platform::current()->interfaceProvider()->getInterface( 1386 Platform::current()->interfaceProvider()->getInterface(
1385 mojo::GetProxy(&service)); 1387 mojo::GetProxy(&service));
1386 m_surfaceLayerBridge = 1388 m_surfaceLayerBridge =
1387 wrapUnique(new CanvasSurfaceLayerBridge(std::move(service))); 1389 wrapUnique(new CanvasSurfaceLayerBridge(std::move(service)));
1388 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), 1390 bool result =
1389 this->height()); 1391 m_surfaceLayerBridge->createSurfaceLayer(this->width(), this->height());
1392 // After creating a new WebLayer, we want to force compositor commit
1393 // to repaint.
1394 document().layoutViewItem().compositor()->setNeedsCompositingUpdate(
1395 CompositingUpdateRebuildTree);
1396
1397 return result;
1390 } 1398 }
1391 1399
1392 } // namespace blink 1400 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698