gecko-dev/gfx/layers
Markus Stange 274b0d6329 Bug 1592150 - Make NativeLayer::NextSurfaceAs* copy existing drawing from previous buffers so that only the update region needs to be drawn. r=jrmuizel
There are three reasons for doing this.
1. It makes the NativeLayer API more compatible with DirectComposition.
2. Copying existing content may be faster than redrawing those pixels. Redrawing
   might have some amount of overdraw which takes up more memory bandwidth.
3. Most importantly: Partial updates now have "unidirectional flow of information":
   The renderer decides which area to redraw, and it redraws exactly that area.

In the past, partial updates required the following dance:
 - Figure out what area changed in this frame. Call that area A.
 - Invalidate that area in the NativeLayer.
 - Get the next surface for drawing from the layer.
 - Request the actual invalid area in the current surface. Call that area B.
 - Redraw B.

Now with this change, the renderer no longer needs to care about B, and can just
redraw what changed in the current frame (A).
This is useful for WebRender because WebRender prepares drawing commands on a separate thread
before it executes them on the render thread. And at the time of preparation, WebRender does
not have access to the native layer. It needs to know what to draw ahead of time.

Differential Revision: https://phabricator.services.mozilla.com/D51760

--HG--
extra : moz-landing-system : lando
2019-11-19 03:11:13 +00:00
..
apz Bug 1585806 - Make SideBits an enum class, add casting where necessary. r=botond 2019-11-16 20:59:34 +00:00
basic Bug 1594950 - Change NextSurface APIs to accept a dirty region, and remove the public method InvalidateRegionThroughoutSwapchain. r=jrmuizel 2019-11-13 18:55:18 +00:00
client Bug 1585760 - Store a flag in the TextureChild indicating use of the ImageBridge. r=sotaro 2019-11-05 01:55:23 +00:00
composite Bug 1585806 - Make SideBits an enum class, add casting where necessary. r=botond 2019-11-16 20:59:34 +00:00
d3d11 Bug 1596630 - Remove mSyncObject->Synchronize() in RenderCompositorANGLE::BeginFrame() r=nical 2019-11-18 09:49:15 +00:00
ipc Bug 1589022 - Partial support for moving a tab between windows with different APZ enablement. r=nika,tnikkel 2019-11-18 23:13:55 +00:00
layerviewer Bug 1562642 - add missing license in gfx/ r=nical 2019-11-12 22:01:02 +00:00
mlgpu Bug 1573710 - Trigger composite after SetParent() r=Gankro 2019-11-01 11:01:34 +00:00
opengl Bug 1576390 - Remove the prefs gfx.core-animation.enabled and gfx.compositor.glcontext.opaque, and all the code needed to support it. r=mattwoodrow,spohl 2019-11-13 19:07:37 +00:00
protobuf
wr Bug 1596630 - Remove mSyncObject->Synchronize() in RenderCompositorANGLE::BeginFrame() r=nical 2019-11-18 09:49:15 +00:00
AnimationHelper.cpp Bug 1594960 - Update the assertion to check the transform-like animations on the compositor when we have fixed offset-path. r=hiro 2019-11-08 23:46:17 +00:00
AnimationHelper.h Bug 1429305 - Cache gfx path. r=hiro 2019-10-31 21:36:39 +00:00
AnimationInfo.cpp Bug 1429305 - Cache gfx path. r=hiro 2019-10-31 21:36:39 +00:00
AnimationInfo.h Bug 1429305 - Cache gfx path. r=hiro 2019-10-31 21:36:39 +00:00
AsyncCanvasRenderer.cpp Bug 1542344 - fix API mismatches in ImageEncoder; r=mccr8 2019-04-08 01:51:17 +00:00
AsyncCanvasRenderer.h Bug 1542344 - fix API mismatches in ImageEncoder; r=mccr8 2019-04-08 01:51:17 +00:00
AtomicRefCountedWithFinalize.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
AxisPhysicsMSDModel.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
AxisPhysicsMSDModel.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
AxisPhysicsModel.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
AxisPhysicsModel.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
BSPTree.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
BSPTree.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
BufferTexture.cpp Bug 1543359 - P6. Add backend for color range information. r=mattwoodrow. 2019-07-26 08:45:31 +00:00
BufferTexture.h Bug 1543359 - P6. Add backend for color range information. r=mattwoodrow. 2019-07-26 08:45:31 +00:00
CanvasDrawEventRecorder.cpp Bug 1585073: In CanvasEventRingBuffer, check stream is good before waiting for space or data. r=jrmuizel 2019-10-31 13:44:32 +00:00
CanvasDrawEventRecorder.h Bug 1570358: Check validity of enums before playing back Moz2D RecordedEvents. r=jrmuizel 2019-08-05 13:08:30 +00:00
CanvasRenderer.cpp Bug 1506665 - Add more GLContext failure handling r=jgilbert 2019-03-01 22:37:37 +00:00
CanvasRenderer.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
CanvasTranslator.cpp Bug 1582372 Part 1: Ensure recorded texture SurfaceDescriptor is not in map for compositor when texture dies. r=mattwoodrow 2019-10-22 20:52:51 +00:00
CanvasTranslator.h Bug 1575874 - Fix ESlint failure a=me on a CLOSED TREE 2019-09-10 14:14:20 +03:00
CompositionRecorder.cpp Bug 1581240 - Return collected frames from the composition recorder as data URIs r=mstange 2019-11-07 22:34:37 +00:00
CompositionRecorder.h Bug 1581240 - Return collected frames from the composition recorder as data URIs r=mstange 2019-11-07 22:34:37 +00:00
Compositor.cpp Bug 1574745 - Move ShouldRecordFrames() from BasicCompositor to Compositor because CompositorOGL will need it. r=mattwoodrow 2019-08-30 19:52:15 +00:00
Compositor.h Bug 1574745 - Move ShouldRecordFrames() from BasicCompositor to Compositor because CompositorOGL will need it. r=mattwoodrow 2019-08-30 19:52:15 +00:00
CompositorTypes.h Bug 1570879 - Fix high contrast theme handling with DirectComposition and WebRender r=nical 2019-10-08 10:07:47 +00:00
CopyableCanvasRenderer.cpp Bug 1506665 - Add more GLContext failure handling r=jgilbert 2019-03-01 22:37:37 +00:00
CopyableCanvasRenderer.h Bug 1530471 - remove layers SkiaGL glue r=jrmuizel 2019-02-28 15:00:06 +00:00
D3D9SurfaceImage.cpp Bug 1543359 - P7. Plumb YUV Color Range info in Windows' Image types. r=mattwoodrow 2019-07-26 08:45:30 +00:00
D3D9SurfaceImage.h Bug 1557257 - Rename KnowsCompositor* aForwarder to aKnowsCompositor r=nical 2019-06-07 12:27:05 +00:00
D3D11ShareHandleImage.cpp Bug 1543359 - P7. Plumb YUV Color Range info in Windows' Image types. r=mattwoodrow 2019-07-26 08:45:30 +00:00
D3D11ShareHandleImage.h Bug 1543359 - P7. Plumb YUV Color Range info in Windows' Image types. r=mattwoodrow 2019-07-26 08:45:30 +00:00
D3D11YCbCrImage.cpp Bug 1543359 - P7. Plumb YUV Color Range info in Windows' Image types. r=mattwoodrow 2019-07-26 08:45:30 +00:00
D3D11YCbCrImage.h Bug 1543359 - P7. Plumb YUV Color Range info in Windows' Image types. r=mattwoodrow 2019-07-26 08:45:30 +00:00
DirectedGraph.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
DirectionUtils.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
Effects.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
Effects.h Bug 1543359 - P9. Add YUV range information to NV12Effect and YCbCrEffect. r=mattwoodrow 2019-07-26 08:45:26 +00:00
FrameMetrics.cpp Bug 1563139 - Update comments mentioning StaticPrefs.h. r=glandium 2019-07-25 04:08:23 +00:00
FrameMetrics.h Bug 1588743 - Remove old scroll-snap implementation, and scroll snapping prefs. r=hiro 2019-10-15 12:40:14 +00:00
GLImages.cpp Bug 1538969 - Report an opaque surface format for AndroidSurfaceTextureData when it's being used for an opaque video. r=jya 2019-04-10 08:08:22 +00:00
GLImages.h Bug 1509316 - p1: move composite listening out of VideoData/VideoSink. r=jya,mattwoodrow 2019-10-09 23:08:12 +00:00
GPUVideoImage.h Bug 1555891 - Merge PVideoDecoderManager into PRemoteDecoderManager. r=jya,jld 2019-06-11 02:01:34 +00:00
IMFYCbCrImage.cpp Bug 1557257 - Rename KnowsCompositor* aForwarder to aKnowsCompositor r=nical 2019-06-07 12:27:05 +00:00
IMFYCbCrImage.h Bug 1557257 - Rename KnowsCompositor* aForwarder to aKnowsCompositor r=nical 2019-06-07 12:27:05 +00:00
IPDLActor.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
ImageContainer.cpp Bug 1543359 - P6. Add backend for color range information. r=mattwoodrow. 2019-07-26 08:45:31 +00:00
ImageContainer.h Bug 1543359 - P13. Let the video decoder determines the default colorspace if unknown. r=mattwoodrow 2019-07-26 08:45:39 +00:00
ImageDataSerializer.cpp Bug 1543359 - P6. Add backend for color range information. r=mattwoodrow. 2019-07-26 08:45:31 +00:00
ImageDataSerializer.h Bug 1543359 - P6. Add backend for color range information. r=mattwoodrow. 2019-07-26 08:45:31 +00:00
ImageLayers.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ImageLayers.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
ImageTypes.h Bug 1493898 - P6. Move YUVColorSpace definition in the gfx namespace. r=mattwoodrow. 2019-04-11 12:41:33 +00:00
LayerAttributes.h Bug 1585806 - Make SideBits an enum class, add casting where necessary. r=botond 2019-11-16 20:59:34 +00:00
LayerMetricsWrapper.h Bug 1552608 - Propagate the fixed-position sides to the hit testing tree. r=tnikkel 2019-10-07 21:41:20 +00:00
LayerScope.cpp Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
LayerScope.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
LayerSorter.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
LayerSorter.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
LayerTreeInvalidation.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-06-08 08:26:37 +00:00
LayerTreeInvalidation.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
LayerUserData.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
Layers.cpp Bug 1585806 - Make SideBits an enum class, add casting where necessary. r=botond 2019-11-16 20:59:34 +00:00
Layers.h Bug 1429305 - Cache gfx path. r=hiro 2019-10-31 21:36:39 +00:00
LayersHelpers.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
LayersHelpers.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
LayersLogging.cpp Bug 1441308 - Core renderroot splitting changes r=kats,sotaro 2019-03-22 18:28:42 +00:00
LayersLogging.h Bug 1441308 - Core renderroot splitting changes r=kats,sotaro 2019-03-22 18:28:42 +00:00
LayersTypes.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
LayersTypes.h Bug 1578380 - Export WaylandDMABUF TextureType, r=sotaro 2019-09-24 11:06:22 +00:00
MacIOSurfaceHelpers.cpp Bug 1543359 - P12. Fix colorspace rendering with IOSurface and basic compositor. r=mattwoodrow 2019-07-26 08:45:40 +00:00
MacIOSurfaceHelpers.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
MacIOSurfaceImage.cpp Bug 1557257 - Rename KnowsCompositor* aForwarder to aKnowsCompositor r=nical 2019-06-07 12:27:05 +00:00
MacIOSurfaceImage.h Bug 1557257 - Rename KnowsCompositor* aForwarder to aKnowsCompositor r=nical 2019-06-07 12:27:05 +00:00
MemoryPressureObserver.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
MemoryPressureObserver.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
NativeLayer.h Bug 1594950 - Change NextSurface APIs to accept a dirty region, and remove the public method InvalidateRegionThroughoutSwapchain. r=jrmuizel 2019-11-13 18:55:18 +00:00
NativeLayerCA.h Bug 1592150 - Make NativeLayer::NextSurfaceAs* copy existing drawing from previous buffers so that only the update region needs to be drawn. r=jrmuizel 2019-11-19 03:11:13 +00:00
NativeLayerCA.mm Bug 1592150 - Make NativeLayer::NextSurfaceAs* copy existing drawing from previous buffers so that only the update region needs to be drawn. r=jrmuizel 2019-11-19 03:11:13 +00:00
PaintThread.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
PaintThread.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
PersistentBufferProvider.cpp Bug 1585760 - Check that GetTextureForwarder isn't null in more places. r=sotaro 2019-11-05 01:54:54 +00:00
PersistentBufferProvider.h Bug 1592213: Allow up to 2 more textures in PersistentBufferProviderShared when webrender enabled. r=nical 2019-10-30 10:05:59 +00:00
ProfilerScreenshots.cpp Bug 1593803 - rename NS_DispatchToBackgroundThread to NS_DispatchBackgroundTask; r=KrisWright 2019-11-05 21:19:18 +00:00
ProfilerScreenshots.h Bug 1450059 - part 2 - move ProfilerScreenshots over to the background thread; r=gregtatum 2019-09-25 12:59:24 +00:00
ReadbackLayer.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
ReadbackProcessor.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ReadbackProcessor.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
RecordedCanvasEventImpl.h Bug 1575828: Ensure that CanvasChild::GetDataSurface is called on the main thread. r=jrmuizel 2019-09-10 02:06:46 +00:00
RenderTrace.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
RenderTrace.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
RepaintRequest.h Bug 1536157 - Make sure we repaint after accepting a visual scroll update. r=kats 2019-03-22 05:20:31 +00:00
RotatedBuffer.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-08-13 07:15:25 +00:00
RotatedBuffer.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ScrollableLayerGuid.h Bug 1547351 - Automatically set content process render root r=kats 2019-07-24 14:10:56 +00:00
ShareableCanvasRenderer.cpp Bug 1441308 - Core renderroot splitting changes r=kats,sotaro 2019-03-22 18:28:42 +00:00
ShareableCanvasRenderer.h Bug 1441308 - Core renderroot splitting changes r=kats,sotaro 2019-03-22 18:28:42 +00:00
SourceSurfaceSharedData.cpp Bug 1534655: Fix some unified build errors inside layers. r=kats 2019-03-12 16:08:18 +01:00
SourceSurfaceSharedData.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
SourceSurfaceVolatileData.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
SourceSurfaceVolatileData.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
SyncObject.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
SyncObject.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
TextureDIB.cpp Bug 1435586 - Use static gfxPlatform methods directly instead of requiring initialization. r=kats 2019-06-05 12:40:26 -04:00
TextureDIB.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
TextureSourceProvider.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TextureSourceProvider.h Bug 1557105 - Handle non-webrender widget case during enabling WebRender at ImageBridge r=nical 2019-06-10 12:36:14 +00:00
TextureSync.cpp Bug 1528881 - Part 6: gfx/layers: Make some global functions static. r=mattwoodrow 2019-02-17 14:25:01 -08:00
TextureSync.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TextureWrapperImage.cpp Bug 1557257 - Rename KnowsCompositor* aForwarder to aKnowsCompositor r=nical 2019-06-07 12:27:05 +00:00
TextureWrapperImage.h Bug 1557257 - Rename KnowsCompositor* aForwarder to aKnowsCompositor r=nical 2019-06-07 12:27:05 +00:00
TiledLayerBuffer.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TransactionIdAllocator.h Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel 2019-04-11 12:36:51 +00:00
TreeTraversal.h Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
UpdateImageHelper.h Bug 1441308 - Core renderroot splitting changes r=kats,sotaro 2019-03-22 18:28:42 +00:00
ZoomConstraints.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
moz.build Bug 1581240 - Return collected frames as a promise to JS r=bzbarsky,mstange,nika 2019-11-07 22:35:04 +00:00