Bug 1320742 - Use Skia to draw webrender snapshot data. r=sotaro?
authorMason Chang <mchang@mozilla.com>
Mon, 28 Nov 2016 10:39:52 -0800
changeset 459833 7629aeb029cbee484cea30eb96dbaace74c5d573
parent 459832 3c3cd985155f9a0c016b2087fce7a41482dfda5f
child 459834 60d5193c142a050031a0f8c299500969889e5e9f
push id41343
push userkgupta@mozilla.com
push dateThu, 12 Jan 2017 20:13:44 +0000
reviewerssotaro
bugs1320742
milestone53.0a1
Bug 1320742 - Use Skia to draw webrender snapshot data. r=sotaro?
gfx/layers/wr/WebRenderBridgeParent.cpp
gfx/layers/wr/WebRenderLayerManager.cpp
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -234,17 +234,17 @@ WebRenderBridgeParent::RecvDPGetSnapshot
     // snapshot, that may be too harsh and we could decide to return some sort
     // of error to the child process and let it deal with it...
     return IPC_FAIL_NO_REASON(this);
   }
 
   MOZ_ASSERT(bufferTexture->GetBufferDescriptor().type() == BufferDescriptor::TRGBDescriptor);
   uint32_t stride = ImageDataSerializer::GetRGBStride(bufferTexture->GetBufferDescriptor().get_RGBDescriptor());
   RefPtr<DrawTarget> target =
-    Factory::CreateDrawTargetForData(gfx::BackendType::CAIRO,
+    Factory::CreateDrawTargetForData(gfx::BackendType::SKIA,
                                      bufferTexture->GetBuffer(),
                                      bufferTexture->GetSize(),
                                      stride,
                                      bufferTexture->GetFormat());
   MOZ_ASSERT(target);
   if (!target) {
     // We kill the content process rather than have it continue with an invalid
     // snapshot, that may be too harsh and we could decide to return some sort
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -239,17 +239,17 @@ WebRenderLayerManager::MakeSnapshotIfReq
   // XXX Add other TextureData supports.
   // Only BufferTexture is supported now.
 
   // TODO: fixup for proper surface format.
   RefPtr<TextureClient> texture =
     TextureClient::CreateForRawBufferAccess(WRBridge(),
                                             SurfaceFormat::B8G8R8A8,
                                             aSize.ToUnknownSize(),
-                                            BackendType::CAIRO,
+                                            BackendType::SKIA,
                                             TextureFlags::DEFAULT);
   if (!texture) {
     return;
   }
 
   texture->InitIPDLActor(WRBridge());
   if (!texture->GetIPDLActor()) {
     return;