Bug 1421187 - P1. Don't use fast path copy when CbCr channel interleaved. r?mattwoodrow draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 28 Nov 2017 14:53:16 +0100
changeset 705060 66b235230c2130a3c2e2fceb37e60f9c4de2aa24
parent 704807 cb9092a90f6ef501e6de8eb5fc6ce19e2717193f
child 705061 607219d441bf07a22e35a7d52ff3f9c79fd4c888
push id91349
push userbmo:jyavenard@mozilla.com
push dateWed, 29 Nov 2017 12:37:47 +0000
reviewersmattwoodrow
bugs1421187
milestone59.0a1
Bug 1421187 - P1. Don't use fast path copy when CbCr channel interleaved. r?mattwoodrow MozReview-Commit-ID: 6lZVoIiViEn
gfx/layers/client/TextureClient.cpp
--- a/gfx/layers/client/TextureClient.cpp
+++ b/gfx/layers/client/TextureClient.cpp
@@ -1814,17 +1814,17 @@ TextureClient::CreateWithData(TextureDat
 
 bool
 MappedYCbCrChannelData::CopyInto(MappedYCbCrChannelData& aDst)
 {
   if (!data || !aDst.data || size != aDst.size) {
     return false;
   }
 
-  if (stride == aDst.stride) {
+  if (stride == aDst.stride && skip == aDst.skip) {
     // fast path!
     // We assume that the padding in the destination is there for alignment
     // purposes and doesn't contain useful data.
     memcpy(aDst.data, data, stride * size.height);
     return true;
   }
 
   for (int32_t i = 0; i < size.height; ++i) {