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

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: fix compilation error Created 4 years 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 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 return String(); 1399 return String();
1398 } 1400 }
1399 1401
1400 bool HTMLCanvasElement::createSurfaceLayer() { 1402 bool HTMLCanvasElement::createSurfaceLayer() {
1401 DCHECK(!m_surfaceLayerBridge); 1403 DCHECK(!m_surfaceLayerBridge);
1402 mojom::blink::OffscreenCanvasSurfacePtr service; 1404 mojom::blink::OffscreenCanvasSurfacePtr service;
1403 Platform::current()->interfaceProvider()->getInterface( 1405 Platform::current()->interfaceProvider()->getInterface(
1404 mojo::GetProxy(&service)); 1406 mojo::GetProxy(&service));
1405 m_surfaceLayerBridge = 1407 m_surfaceLayerBridge =
1406 WTF::wrapUnique(new CanvasSurfaceLayerBridge(std::move(service))); 1408 WTF::wrapUnique(new CanvasSurfaceLayerBridge(std::move(service)));
1407 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), 1409 bool result =
1408 this->height()); 1410 m_surfaceLayerBridge->createSurfaceLayer(this->width(), this->height());
1411 // After creating a new WebLayer, we want to force compositor commit
1412 // to repaint.
1413 document().layoutViewItem().compositor()->setNeedsCompositingUpdate(
1414 CompositingUpdateRebuildTree);
1415 return result;
1409 } 1416 }
1410 1417
1411 } // namespace blink 1418 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698