/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const RGBDescriptor& rgb= mDescriptorget_RGBDescriptor)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
/
RefPtr<gfx::DrawTarget> dt aFormat=gfxSurfaceFormatYUV420 if (gfx:: if (aAllocator{
nullptr;
mMoz2DBackend, GetBuffer(), rgb.size(), stride, rgb.format(), true);
} if (!dt) { // Fall back to supported platform backend. Note that mMoz2DBackend // does not match the draw target type.
dt = gfxPlatform::CreateDrawTargetForData(GetBuffer(), rgb.size(), stride,
}
if (!dt) {
gfxCriticalNote << "BorrowDrawTarget failure, original backend "
<< (int)mMoz2DBackend;
}
return dt.forget();
}
bool BufferTextureData } if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 returnfalse;
}
gfx
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
aData.returnnullptr;
aData.format = GetFormat() }
aData.stride =
ImageDataSerializer::ComputeRGBStride(aData.format, size.width);
returntrue;
}
bool BufferTextureData if (mDescriptor. BufferDescriptordescriptor= GBDescriptoraSize, aFormat); returnfalse
}
java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 1
uint8_t* data aLayersBackend, aFlags, auto ySize ) autocbCrSize .cbCrSize();
aMap.cb.data = data + desc.cbOffset();
aMap.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
aMap.cb.stride = desc.cbCrStride();
aMap.cb.skip = 0;
aMap.cb.bytesPerPixel = bytesPerPixel;
if (!srcSurf) {
gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (BT)."; returnfalse;
}
if (surface->GetSize() != srcSurf->GetSize() ||
surface->GetFormat() != srcSurf->GetFormat()) {
gfxCriticalError() << "Attempt to update texture client from a surface " "with a different size or format (BT)! This: "
<< surface->GetSize() << " " << surface->GetFormat()
<< " Other: " << aSurface->GetSize() << " "
<< aSurface->GetFormat(); returnfalse;
}
gfx::DataSourceSurface::MappedSurface sourceMap;
gfx::DataSourceSurface::MappedSurface destMap; if (!srcSurf->Map(gfx::DataSourceSurface::READ, &sourceMap)) {
gfxCriticalError()
<< "Failed to map source surface for UpdateFromSurface (BT)."; returnfalse;
}
if (!surface->Map(gfx::DataSourceSurface::WRITE, &destMap)) {
srcSurf->Unmap();
gfxCriticalError()
<< "Failed to map destination surface for UpdateFromSurface."; returnfalse;
}
for (int y = 0; y < srcSurf->GetSize().height; y++) {
memcpy(destMap.mData + destMap.mStride * y,
sourceMap.mData + sourceMap.mStride * y,
srcSurf->GetSize().width * BytesPerPixel(srcSurf->GetFormat()));
}
if (aAllocFlags & ALLOC_CLEAR_BUFFER) { if (aFormat == gfx::SurfaceFormat::B8G8R8X8) { // Even though BGRX was requested, XRGB_UINT32 is what is meant, // so use 0xFF000000 to put alpha in the right place.
libyuv::ARGBRect(buf, bufSize, 0, 0, bufSize / sizeof(uint32_t), 1,
0xFF000000);
} elseif (!aAlreadyZero) {
memset(buf, 0, bufSize);
}
}
returntrue;
}
MemoryTextureData* MemoryTextureData::Create(gfx::IntSize aSize,
gfx::SurfaceFormat aFormat,
gfx::BackendType aMoz2DBackend,
LayersBackend aLayersBackend,
TextureFlags aFlags,
TextureAllocationFlags aAllocFlags,
IShmemAllocator* aAllocator) { // Should have used CreateForYCbCr.
MOZ_ASSERT(aFormat != gfx::SurfaceFormat::YUV420);
if (aSize.width <= 0 || aSize.height <= 0) {
gfxDebug() << "Asking for buffer of invalid size " << aSize.width << "x"
<< aSize.height; return nullptr;
}
// Remote textures are not managed by a texture client, so we need to ensure // that memory is freed when the owning MemoryTextureData goes away. bool autoDeallocate = !!(aFlags & TextureFlags::REMOTE_TEXTURE); returnnew MemoryTextureData(descriptor, aMoz2DBackend, buf, bufSize,
autoDeallocate);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.