diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-06 15:53:52 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-06 15:53:52 +0200 |
commit | 941e54654eabed0a3568f7fefe424a45aa02eddb (patch) | |
tree | 49aa02b174c428962d99142d8061267bfcd79e69 /gfx/layers/composite | |
parent | ad9ee72dcd7981bc47b3844a224d69fadfdfd8ef (diff) | |
parent | 0daa12376295d5d796256a116eb2a348a3a9273f (diff) | |
download | UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.gz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.lz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.xz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into _testBranch_test_1
Diffstat (limited to 'gfx/layers/composite')
-rwxr-xr-x | gfx/layers/composite/ContainerLayerComposite.cpp | 24 | ||||
-rw-r--r-- | gfx/layers/composite/TextureHost.cpp | 9 |
2 files changed, 6 insertions, 27 deletions
diff --git a/gfx/layers/composite/ContainerLayerComposite.cpp b/gfx/layers/composite/ContainerLayerComposite.cpp index 35070cad6..f25503532 100755 --- a/gfx/layers/composite/ContainerLayerComposite.cpp +++ b/gfx/layers/composite/ContainerLayerComposite.cpp @@ -35,9 +35,6 @@ #include "TextRenderer.h" // for TextRenderer #include <vector> #include "GeckoProfiler.h" // for GeckoProfiler -#ifdef MOZ_ENABLE_PROFILER_SPS -#include "ProfilerMarkers.h" // for ProfilerMarkers -#endif #define CULLING_LOG(...) // #define CULLING_LOG(...) printf_stderr("CULLING: " __VA_ARGS__) @@ -86,26 +83,7 @@ static gfx::IntRect ContainerVisibleRect(ContainerT* aContainer) static void PrintUniformityInfo(Layer* aLayer) { -#ifdef MOZ_ENABLE_PROFILER_SPS - if (!profiler_is_active()) { - return; - } - - // Don't want to print a log for smaller layers - if (aLayer->GetLocalVisibleRegion().GetBounds().width < 300 || - aLayer->GetLocalVisibleRegion().GetBounds().height < 300) { - return; - } - - Matrix4x4 transform = aLayer->AsLayerComposite()->GetShadowBaseTransform(); - if (!transform.Is2D()) { - return; - } - - Point translation = transform.As2D().GetTranslation(); - LayerTranslationPayload* payload = new LayerTranslationPayload(aLayer, translation); - PROFILER_MARKER_PAYLOAD("LayerTranslation", payload); -#endif + /*** STUB ***/ } /* all of the per-layer prepared data we need to maintain */ diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index e7d87e238..e4a2ffd86 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -259,7 +259,9 @@ CreateBackendIndependentTextureHost(const SurfaceDescriptor& aDesc, case BufferDescriptor::TYCbCrDescriptor: { const YCbCrDescriptor& ycbcr = desc.get_YCbCrDescriptor(); reqSize = - ImageDataSerializer::ComputeYCbCrBufferSize(ycbcr.ySize(), ycbcr.cbCrSize()); + ImageDataSerializer::ComputeYCbCrBufferSize(ycbcr.ySize(), ycbcr.cbCrSize(), + ycbcr.yOffset(), ycbcr.cbOffset(), + ycbcr.crOffset()); break; } case BufferDescriptor::TRGBDescriptor: { @@ -272,7 +274,7 @@ CreateBackendIndependentTextureHost(const SurfaceDescriptor& aDesc, MOZ_CRASH("GFX: Bad descriptor"); } - if (bufSize < reqSize) { + if (reqSize == 0 || bufSize < reqSize) { NS_ERROR("A client process gave a shmem too small to fit for its descriptor!"); return nullptr; } @@ -888,8 +890,7 @@ BufferTextureHost::Upload(nsIntRegion *aRegion) mFirstSource = mCompositor->CreateDataTextureSource(mFlags|TextureFlags::RGB_FROM_YCBCR); mFirstSource->SetOwner(this); } - mFirstSource->Update(surf, aRegion); - return true; + return mFirstSource->Update(surf, aRegion); } RefPtr<DataTextureSource> srcY; |