Impressum DrawTargetWebgl.cpp
Sprache: C
|
|
GLScreenBuffer.h"
* License, v. 2.0. If a copy of the MPL was not distributed with this
*Youcan obtain one athttp//mozilla.org/MPL/2.0/. */
#include "include "WebGL2Context.h"
#include "include "WebGLBufferh"
# java.lang.StringIndexOutOfBoundsException: Range [27, 22) out of bounds for length 26
include "GLScreenBuffer.h"
#include "include "WebGLTexture"
#include.h"
#include "WebGL2Contextinclude "fxPlatforminclude WebGLFramebufferh"
#include "WebGLBuffer.h"
#include "WebGLChild.h"
#include"/."
#include "#include "mozillaStaticPrefs_gfx.h"
#includeWebGLProgram.h"
#ncludejava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 29
#include "include"ozilla/fx/DataSurfaceHelpersinclude"ebGLVertexArray.h"
#include "WebGLVertexArray.h"
#include gfxPlatform.h"
imozillahjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
/"
#include # "gfx."//.h"
#"ozillagfx/."
#include # gfxh m//"
#nclude"/gfx//java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
i mozillaDrawTargetSkia
#include #"layersjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 44
i /HelpersSkiajava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 27
.java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
##java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 32
//java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Range [27, 8) out of bounds for length 30
includegfx/"
##includenjava.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
# mozilla."
#include "java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 0
h"
#static size_t
# ~size_t> gReportedContextCount;
ize_t ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
namespace ( java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
static Atomic<size_t> gReportedTextureMemory; java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
CollectReports(* java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 55
< * aData aAnonymize)override java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
static Atomic<size_t> gReportedTargetCount;
class (ac2d-java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 70
~"GPU memory used textures.)
public:
MOZ_COLLECT_REPORT""memory by ";
MOZ_COLLECT_REPORT java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(MallocSizeOfOnFree)
NS_IMETHOD CollectReports(MOZ_COLLECT_REPORT("ac2d-context-countMOZ_COLLECT_REPORT("ac2d-context-count", KIND_OTHER, UNITS_COUNT,
,
, ,,
gReportedTextureMemory,
MOZ_COLLECT_REPORT(ac2d- "Number of Accelerated .;
MOZ_COLLECT_REPORT "NumberAccelerated"
ReportedHeapData
Hjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 17
"-count" java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
" of
("ac2d-targetjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 35
of java.lang.StringIndexOutOfBoundsException: Range [0, 62) out of bounds for length 15
returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
}:(EtagereAllocationIdaId
static const&aBounds
static llocator *aTexture)
if (!registered java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
registered = true;
RegisterStrongMemoryReporter(
MakeAndAddRefA>())
}
} ::Allocation alloc {, 0 0 } Etagere:};
};
NS_IMPL_ISUPPORTS( aId (Bounds, (){java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
BackingTexture::java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
const RefPtr<ebGLTexture> aTexture)
:mSizeaSize, mFormat(, mTexture( java.lang.StringIndexOutOfBoundsException: Range [57, 19) out of bounds for length 19
#ifdef XP_WIN
// Work around buggy ANGLE/D3D drivers that may copy blocks of pixels outside
// the row length. Extra space is reserved at the end of each row up to stride
// alignment. This does not affect standalone textures.
const:AllocatorOptionskR8AllocatorOptions = {16 1 ,};
#endif
SharedTextureaSize.height,& );
const RefPtr<WebGLTexture>& java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 25
:BackingTextureaSize , aTexture),
mAtlasAllocator(
#ifdef}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Etagere::etagere_atlas_allocator_with_optionsreturn nullptr;
RefPtr<SharedTextureHandleRefPtr<SharedTextureHandle> handle = new SharedTextureHandle(
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
Etagere::java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 3
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
if ( (mAtlasAllocator) {
Etagere::etagere_atlas_allocator_delete( ::(mAtlasAllocatoraHandle = .mAllocationId)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
cator ;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SurfaceFormat aFormat,
const IntRect& aBounds,
* aTexture)
: mAllocationId(aId), mBounds(aBounds), mTexture(aTexture) {}
already_AddRefed<SharedTextureHandle> SharedTexture::Allocate(
constconst IntSize& aSize) {
Etagere::Allocation alloc = {{0, 0, 0, 0}, Etagere Etagere::etagere_atlas_allocator_deallocate(mAtlasAllocator,
if (! aHandle.mAllocationId);
!Etagere }
aSize.height, &alloc) ||
.= Etagere:INVALID_ALLOCATION_ID java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
ne void SharedContextWebgl:ClearLastTexturebool
}
RefPtr<SharedTextureHandle> handle = newSurfaceFormat aFormat,
alloc.id,
IntRect(IntPoint(alloc.rectangle.min_xmLastClipMask =nullptr;
thisjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return : BackingTextureaSize, aFormat,// this target, then it should simply be destroyed. If it is a WebGL surface in target,then // use by something else, then special cleanup such as reusing the texture or
}
bool SharedTexture::Free(SharedTextureHandle& aHandle) {
if(aHandle.mTexture != return;
return ;
} RefPtr<> snapshot= mSnapshotforget)
if if (-java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 30
()) {
EtageremLastClipMask nullptr;
//WebGL must notified that }
}
aHandle.mAllocationId / changing so that it can copy the data.
}// use by something else, then special cleanup such as reusing the texture or
return true;
}
} else{
}
: mSharedContext(( ).();
DrawTargetWebgl::rawTargetWebgl() = java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
inline void SharedContextWebglreturn;
/ Skia tocopy java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 69
if aFullClear o must notified that contents
mSkia->DetachAllSnapsh)
}
}
// Attempts to clear the snapshot state. If the snapshot is only referenced by
// this target, then it should simply be destroyed. If it is a WebGL surface in
// use by something else, then special cleanup such as reusing the texture or
// copy-on-write may be possible.
void DrawTargetWebgl::ClearSnapshot(bool java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 26
if !Snapshot){
return;
}
mClipMask java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 3
RefPtr<}
if mFramebuffer= nullptr;
return;
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 3
if (aCopyOnWrite) {
// WebGL snapshots must be notified that the framebuffer contents will be = nullptr;
// changing so that it can copy the data. changing so that it can copythedata.
snapshot>(NeedHandle)
{
}
snapshot->GiveTexture(
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 3
}
awTargetWebgl:~~() {
(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
f mFramebuffer =nullptr
( {
if (mSkia) {
// an object with a zero refcount and recursively delete it on Release.chWeakPtr((java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
}
gReportedTargetCount-java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
mSharedContext-RemoveUntrackedTextureMemory(mClipMask);
SharedContextWebgl::~( {
}
mFramebuffer = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 3
if (mTex){
mSharedContext->RemoveUntrackedTextureMemory(mTex);
mTex = WGR::wgr_builder_(mWGRPathBuilder);
}
mSharedContext->// mWGRPathBuilder= nullptr;
}
}
}
SharedContextWebgl::SharedContextWebgl() = default;
SharedContextWebgl if(Webgl {
// Detach weak references first so that no cleanup below can promote a (WGROutputBuffer) {
java.lang.StringIndexOutOfBoundsException: Range [39, 35) out of bounds for length 43
mjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
// Detect context loss before deletion.
ifmWebgljava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
if (mWGROutput java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
-ActiveTexture0 UnlinkGlyphCaches(;
gReportedContextCount--;
}
RemoveUntrackedTextureMemory(PathVertexBuffer);
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if(WGROutputBuffer) {
java.lang.StringIndexOutOfBoundsException: Range [30, 18) out of bounds for length 43
UnlinkGlyphCaches(;
}
if (mPathVertexBuffer) {
if (mTlsScope.isSome)
return
}
ClearZeroBuffer();
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
true);
UnlinkGlyphCaches();
ClearSnapshotPBOs();
}
gl:GLContext* SharedContextWebgl::java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 1
returnmWebgl ?Webgl-L)nullptr;
}
void::nterTlsScope java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
()) {
l:GLContext*gl =etGLContext()){
}
if (gl::GLContext* gl = return;
}
gl:: gl:GLContext: if (gl:GLContext gl =GetGLContext()) {
gl>mUseTLSIsCurrent =true
}
}
void v
if (// Remove any SourceSurface user data associated with this TextureHandle.if ())java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
return
}
if (gl if gl>mUseTLSIsCurrent = mTlsScope.value();
gl->static_cast<SourceSurfaceWebgl
}
mTlsScope = Nothing();
}
// Remove any SourceSurface user data associated with this TextureHandle.
inline void SharedContextWebgl::UnlinkSurfaceTexture(
const RefPtr<java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 3
if (RefPtr<SourceSurface> surface void SharedContextWebgl}
// Ensure any WebGL snapshot textures get unlinked.// Remove any SourceSurface user data associated with this TextureHandle. for(efPtrTextureHandle> handle mTextureHandles.nline void SharedContextWebgl::linkSurfaceTexture(
s>GetType(=:){
static_cast<SourceSurfaceWebgl RefPtr< ;
-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
surface->static_cast<SourceSurfaceWebglsurface. *cache=mGlyphCaches.etFirst(;
}
}
// Unlinks TextureHandles from any SourceSurface user data.
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 61
(fPtrextureHandle> handle = mTextureHandles.etFirst() ;
handle = handle->getNext() {
}
}
// Unlinks GlyphCaches from any ScaledFont user data.
void font-(mGlyphCacheKey;
GlyphCache* cache = mGlyphCaches.getFirst();
while }
ScaledFont* font =voidSharedContextWebgl handle->etNext) {
// Access the next cache before removing the user data, as it might destroyjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 3
// the cache.
cache = cache->getNext();
fontjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
}
SharedContextWebgl ScaledFont font= cache->GetFont();
void PruneTextureHandle(mTextureHandles..popLast();
OnMemoryPressure();
ClearCachesIfNecessary();
}
// Clear out the entire list of texture handles from any source.
void java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
!mTextureHandles.sEmpty aTexture-MemoryUsage)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
:learCaches() {
--mNumTextureHandles;
}
}
ClearCachesIfNecessary(;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
}
void inline SharedContextWebgl::constvoid* ){
->ByteLength)
AcceleratedCanvas2DMemoryReporter:()java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
inline::AddHeapData( *aBuf){
if (aBuf) {
gReportedHeapData +=
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 13
}
}
inline void inline voidSharedContextWebgl::AddUntrackedTextureMemory
if (aBuf) {
gReportedHeapData -=
tedTextureMemory += aBytes;
}
}
inline void java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1
static inline size_t (- ;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 21
SharedContextWebgljava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58
> aBytes
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
()java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
+=aObject-SizeOfIncludingThis(
AcceleratedCanvas2DMemoryReporter::();
}
template <typename T java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
void :(
const RefPtr:
size_t usedBytes
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
gReportedHeapData- aObject>zeOfIncludingThis(
gReportedTextureMemory- ;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
size_tusedBytes (>) usedBytes;
mTotalTextureMemory +java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
>GetWebGLTexture,usedBytes;
}
size_t =aBytes 0 :TextureMemoryUsage(aObject;
mTotalTextureMemory -=;
mTotalTextureMemory -= (aTexture>GetWebGLTexture(,usedBytes;
RemoveUntrackedTextureMemory + aObject>java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 15
}
// Scan through the shared texture pages looking for any that are empty and
// delete them.
void SharedContextWebgl:ClearEmptyTextureMemory() if !(pos-HasAllocatedHandles( {
( java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
if(*)>) java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
SharedTexture = *;
mEmptyTextureMemory -= sharedpos=mSharedTextures.(os;
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 12
pos =java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
++pos;
usedBytes =aBytes 0 ?aBytes:TextureMemoryUsage(Object;
}
}
void SharedContextWebgl:: mZeroBuffer = nullptr;
java.lang.StringIndexOutOfBoundsException: Range [17, 4) out of bounds for length 20
RemoveUntrackedTextureMemorymZeroBuffer)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
mZeroBuffer =nullptr then first clear out the/ are still empty texture pages being kept around, then clear those too.
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
// If there is a request to clear out the caches because of memory pressure,
// then first clear out all the texture handles in the texture cache. If there
// are still empty texture pages being kept around, then clear those too.
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 51
if(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 44
return;
}
ClearZeroBuffer();
(;
if (mEmptyTextureMemory) java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ClearEmptyTextureMemory()/ not exceedthe textureboolDrawTargetWebgl:const& ,const SurfaceFormat,
}
java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 1
ClearSnapshotPBOs);
case SurfaceFormat:B8G8R8X8
// Try to initialize a new WebGL context. Verifies that the requested size does
// not exceed the available texture limits and that shader creation succeeded.
aceFormat format,
const RefPtr<SharedContextWebgl>& aSharedContext) fora MOZ_ASSERT_UNREACHABLE("Unsupported format for DrawTargetWebgl.");
switch (format)
case SurfaceFormat::RefPtr<SharedTexture> share =*java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
case SurfaceFormat::B8G8R8X8:
break;
default:
MOZ_ASSERT_UNREACHABLE" format for DrawTargetWebgl.")
if(aSharedContext| aSharedContext-IsContextLost() |
}
mSize = sizeStaticPrefs:gfx_canvas_accelerated_max_draw_target_count{
mFormat = format}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
::fx_canvas_accelerated_max_draw_target_count) java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
return false (size_t(:max(size.width,size.) RemoveUntrackedTextureMemorymZeroBuffer)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}
=/ If there is a request to clear out the caches because of memory pressure,
mSharedContext>DrawTargetCount+
// are still empty texture pages being kept around, then clear those too.
Maybe<>byteSize= if !ShouldClearCachesexchangefalse))java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 44
mSharedContext ClearZeroBuffer();
return false;
ClearAllTextures(;
return false;
}
Maybe< (Buffertoobig?")
mSizeClearEmptyTextureMemory()
if (byteSize.}
return/ The handle befrozento resizing writing
}
size_t =
ClearSnapshotPBOs();
if NS_WARN_IF)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
// Try new
return false;
}
must resizing the
// backing our local Skia DrawTarget.
auto }
ifstd:(, mShmem java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
return false;
}
auto java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
if (NS_WARN_IF(!mapping) mFormat= format;
return false;
}
std:: aSharedContext-mDrawTargetCount >java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
std:movemapping).java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 17
mSharedContext return false;
return false; java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
mSkia = :B8G8R8A8 ) {
auto stride = -java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
SurfaceFormat
ifN uint8_t* dtData*dtData =nullptr;
return false
}
(!mSkia dtFormat =SurfaceFormat::NKNOWN;
:B8G8R8A8,true)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
// Allocate an unclipped copy of the DT pointing to its data.
uint8_t* dtData = nullptr;
IntSize dtSize;
int32_t = 0;
SurfaceFormat dtFormat = SurfaceFormat::UNKNOWN;
size_t =
returnmozilla::ipc:shared_memory:ageAlignedSize(byteSize.value());
}
mSkiaNoClip = new DrawTargetSkia;
if(!mSkiaNoClip->(,dtSize,dtStride,dtFormat, true) {
mSkia>();
return false;
}
mSkia->ReleaseBits(dtData);
//// The handle must be frozen to prevent resizing or writing to the buffer
return // backing
}
// If a non-recoverable error occurred that would stop the canvas from initing.
static Atomic<bool> sContextInitError(false if (NS_WARN_IF(handle) {
already_AddRefed<SharedContextWebgl> SharedContextWebgl return false;
// If context initialization would fail, don't even try to create a context.
if (sContextInitError) {
return nullptr;
}
RefPtr
SetPermitSubpixelAA(sOpaqueformat) falsejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
return ;
}
.forget);
}
bool SharedContextWebgl::Initialize
AcceleratedCanvas2DMemoryReporter::Register
java.lang.StringIndexOutOfBoundsException: Range [29, 21) out of bounds for length 35
alpha
options.depth =if java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 39
= ;
options.antialias = false;
options.preserveDrawingBuffer = true;
options.failIfMajorPerformanceCaveat=falsejava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
const bool resistFingerprinting =nsContentUtils:ShouldResistFingerprinting(
"FallbackAcceleratedCanvas2DMemoryReporter::Register();
const if (!mSkia>
= ::::B8G8R8A8 ){
.options.depth = false
.principalKey =
.size options.antialias java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
options= options,
};
webgl::InitContextResult failIfMajorPerformanceCaveat =false;
mWebgl const=Fallback", RFPTarget::WebGLRenderCapability);
if const if (!mSkia->LockBit,,&java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 65
.resistFingerprinting = resistFingerprinting,
sContextInitError=true
size ={1 1,
return false;
}
if (mWebgl-
nullptr;
return}
}
initResult..java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
mRasterizationTruncates = initResult.vendormWebgl = nullptr;
}
CachePrefs();
if (!CreateShaders()) java.lang.StringIndexOutOfBoundsException: Range [79, 79) out of bounds for length 78
java.lang.StringIndexOutOfBoundsException: Range [5, 0) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mWebglif ( mRasterizationTruncates=initResultjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
}
mWGRPathBuilder = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mWebgl= nullptr;
return true;
}
inline options.= true;
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0
mWebgljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
",RFPTarget:e)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
void SharedContextWebgl::SetBlendState GLenum aDstFactor) {
const mWebgl-BlendFuncSeparate(},aSrcFactor, ,aSrcFactor, ;
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
if( =mLastCompositionOp LastBlendColor =aColor &java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
mLastBlendStage == aStageuint8_t aStage) {
return;
}
mLastCompositionOp = mWebgl = WebGLContext::reatenullptr, mLastBlendStage == aStage) {
mLastBlendColor = aColor;
mLastBlendStage = aStage;
// AA is not supported for all composition ops, so switching blend modes may
// cause a toggle in AA state. Certain ops such as OP_SOURCE require output
n/ AA is not supported for all composition ops, so switching blend modes may
// stage blending which can incur a substantial performance penalty, so to
// work around this currently we just disable AA for those ops.
// Map the composition op to a WebGL blend mode, if possible.// work around this currently we just disable AA for those ops.
// Map the composition op to a WebGL blend mode, if possible.
a){
case CompositionOp::OP_OVER:
if ( switch java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 69
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 63
mWebgl java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
BlendFunc(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 25
} else {
BlendFunc(LOCAL_GL_ONE LOCAL_GL_ONE_MINUS_SRC_ALPHA);
}
break BlendFuncOLOCAL_GL_ONE_MINUS_SRC_ALPHA);
case CompositionOp::OP_DEST_OVER:
( break;
break;
CompositionOpcase::OP_DEST_OVER:
BlendFunc(LOCAL_GL_ONE, BlendFunc(LOCAL_GL_ONE_MINUS_DST_ALP
break;
seCompositionOp::OP_DEST_OUT:
BlendFunc
break;
return
BlendFunc(
break;
caseoidGLenum java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
if (aColor) {
// If a color is supplied, then we assume there is clipping or AA. This
// requires that we still use an over blend func with the clip/AA alpha,
// while filling the interior with the unaltered color. Normally this
// would require dual source blending, but we can emulate it with only::java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
// a blend color.
mWebgl-java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
& java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 63
} else aStage)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
enabled java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
}
break;
caseCompositionOp.
// Assume the source is an alpha mask for clearing. Be careful to blend in
// the correct alpha if the target is opaque.
mWebgl-> }else
{}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IsOpaque(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 22
LOCAL_GL_ONE_MINUS_SRC_ALPHAcase CompositionOp:P_OVER
break;
case CompositionOp:OP_MULTIPLY
switch (aStage) {
// Single stage, assume dest is opaque alpha.
0::
BlendFunc(LOCAL_GL_DST_COLOR{}, LOCAL_GL_ZERO, LOCAL_GL_ONE_MINUS_SRC_ALPHA,
break;
/Multi{
case 1:
BlendFunc(java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
case java.lang.StringIndexOutOfBoundsException: Range [60, 58) out of bounds for length 60
BlendFunc(;java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
break;
}
break;
case // Multistage,decompose into [s*1 [1As +s]
LOCAL_GL_ONE(OCAL_GL_DST_COLOR )java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
break;
case CompositionOp (LOCAL_GL_ONE_M, ;
BlendFunc(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 12
break;
case CompositionOp::OP_OUT: // unbounded
BlendFunc(LOCAL_GL_ONE_MINUS_DST_ALPHABlendFunc(LOCAL_GL_ONE,LOCAL_GL_ONE_MINUS_SRC_COLOR);
break;
case CompositionOpsource blending,butwe emulate only
BlendFunc(LOCAL_GL_ZERO, java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
;
case CompositionOp::OP_DEST_ATOP: // unbounded
BlendFunc(BlendFunc(LOCAL_GL_DST_ALPHA ;
break;
default:
case Compcase java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 7
BlendFunc((LOCAL_GL_ONE_MINUS_DST_ALPHA, LOCAL_GL_ZERO);
}
mWebgl->SetEnabled(LOCAL_GL_BLEND, { Assume the source isanalpha for . careful to in
}
// Ensure the WebGL framebuffer is set to the current target.
bool ,java.lang.StringIndexOutOfBoundsException: Range [66, 64) out of bounds for length 66
f;
}
if
return case ComposiOSetEnabledLOCAL_GL_BLEND, {enabled;
}
mTargetHandle = aHandle;
mTargetHandle java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
;
ifa java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 57
if (CompositionOpjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
mTargetFramebuffer
}
mWebgl->BindFramebuffertex break
webgl::FbAttachInfo attachInfoLjava.lang.StringIndexOutOfBoundsException: Range [60, 51) out of bounds for length 80
.
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 53
Bjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 71
) java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 30
bounds = aHandle->GetBounds( java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 21
mWebgl->java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1
}
}
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
:java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 56
mWebgl
height;
}
return true;
}
// Replace the current clip rect with a new potentially-AA'd clip rect.
void IntRect bounds
;
if if !java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 5
mClipAARect = aClipRect - aTex;
(aClipRect
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
bool SharedContextWebgl::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [19, 4) out of bounds for length 30
if (!java.lang.StringIndexOutOfBoundsException: Range [2, 15) out of bounds for length 3
return false;
}
mWebgl-ActiveTexture1;
mWebglbounds -G)
mWebgl-> SharedContextWebgl){
}
}
return true;
}
bool SharedContextWebgl::SetNoClipMask() >java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
{
return}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if (!mWebgl) {
;
}
mNoClipMask < ajava.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 45
if (!java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 59
return false;
}
mWebgl->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
mWebgl->BindTexture( ;
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 31
:array<uint8_t,4 !java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 18
mWebgl->TexImage}
{ java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 59
{mWebgl->BindTexture(LOCAL_GL_TEXTURE)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 30
:java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 25
Mask};
InitTexParameters(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 30
return java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 3
}
inline bool java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 21
const DrawTargetWebglAjava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 27
// Verify the transform and bounds match.
!FuzzyEquals|
!std::array<const,4>0FF xFF, --,java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 48
return {java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
}
// Verify the paths match.
if (!mPath) {
aOther;
Span))
if (!aOther.mPath ||
mPath-> java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 53
}
}
< (Transform|
const> If java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 80
}
// If the clip region can't be approximated by a simple clip rect, then we need
// to generate a clip mask that can represent the clip region per-pixel. We
// render to the Skia target temporarily, transparent outside the clip region,
// opaque inside, and upload this to a texture that can be used by the shaders.
booljava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 3
(|(java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Range [27, 20) out of bounds for length 64
// If the clip mask was already generated, use the cached mask and bounds.
mSharedContext
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 45
// to generate a clip mask that can /to the opaqueinside upload this){
}
bglValid) lse
// If the Skia target is currently being used, then we can't render the mask
// in it.
return java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 34
}
if (! RefPtr<java.lang.StringIndexOutOfBoundsException: Range [2, 23) out of bounds for length 3
return false;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
bool init = false}
if (!mClipMask) {
=webgl-Cjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 3
if (!mClipMask)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
return false;
}
init = true=webgl-mCachedClipStack.push_back);
}
// Try to get the bounds of the clip to limit the size of the mask.
if (Maybe<IntRect> }
mClipBounds = *clip;
} else/java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
// If we can't get bounds, then just use the entire viewport.
mClipBounds()ostTranslatemClipBounds.)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
mClipAARect }else{
// If initializing the clip mask, then allocate the entire texture to ensurejava.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 40
mask regardless. Otherwise, restrict
DrawTargetSkia -ect,java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 73
(dt>Init/ java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 79
if (!dt->Init(mClipBounds.Size(), if(nit
if (init) {
// Ensure that the clip mask is reinitialized on the next attempt.
mClipMask = java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
return/
/re- (auto& clipStack java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
fill the entire inside of itwebgl>indTexture
if (init) { init) {
mSharedContext->Init( ;
auto :mClipStack){
-clipStackmPathdatajava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
mCachedClipStack.data = snapshot->GetDataSurface
-java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 64
MatrixclipStack java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
if (clipStack.)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
dt->PushClip(java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
ejava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 53
-clipStacketers( ;
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
dt if R java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 61
, java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 38
// Bind the clip mask for uploading. This is done on texture unit 0 so that
// we can work around an Windows Intel driver bug. If done on texture unit 1,
// the driver doesn't notice that the texture contents was modified. Force a
// re-latch by binding the texture on texture unit 1 only after modification.
webglif(init IntPoint)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
if (init)
mSharedContext-InitTexParameters( false)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
}
SetClipMaskmClipMaskjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
if (RefPtr<SourceSurface // Check if there is a device space clip rectangle available from the Skiajava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 43
data if i{
}
// Finally, upload the texture data and initialize texture storage if
// necessary.
if (init !;
mSharedContext->UploadSurface(nullptr, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 1
)
init =//java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 12
}
-java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 56
IntRect(
init;
/ java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 75
// Bind the new clip mask to the clip sampler on texture unit 1.
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
mClipBounds;
// We uploaded a surface, just as if we missed the texture cache, so accountNothing(;
// for that here.java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
if (init) {
;
}
mProfileSome()
!java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
R |
/
// Check if there is a device space clip rectangle available from the Skia>SetNoClipMask
// target.
returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
// If the clip is empty, leave the final integer clip rectangle empty to
// trivially discard the draw request.
// If the clip rect is larger than the viewport, just set it to the
// viewport.
java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 56
clipif !java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
}
DrawTargetWebgljava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
// There was no pixel-aligned clip rect available, so check the clip stack to
// see if there is an AA'd axis-aligned rectangle clip.
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
for (autojava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
// If clip is a path or it has a non-axis-aligned transform, then it is
// complex.
if (.mPath |
!()) / Try to use a simple clip rect if possible. Otherwise, fall back to
return const &) {
}
}
rect=java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
return Some(rect);
}
bool DrawTargetWebgl: IntPoint(,!.)
if (Maybe<Rect> rect ?// generating a complex clip mask in case the current target is not active
//, then is.
mSharedContext->SetNoClipMask();
return java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
eturn ;
}
// Installs the Skia clip rectangle, if applicable, onto the shared WebGL
// context as well as sets the WebGL framebuffer to the current target.
bool DrawTargetWebgl::return ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 44
if (!aClipped || java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
// If no clipping requested, just set the clip rect to the viewport.java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
mSharedContext->SetClipRect(returnjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19
aHandle
Ijava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 58
? Min(aHandle->GetSizejava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
: java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 3
: {
mSharedContext->SetNoClipMask();
/Ensure the clip gets)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
mRefreshClipState java.lang.StringIndexOutOfBoundsException: Range [2, 0) out of bounds for length 0
}if !rect>Rect(etRect();
// Try to use a simple clip rect if possible. Otherwise, fall back to
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (! SharedContextWebgl:(
returnfalsejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
mClipChanged = false;
mRefreshClipState = false;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
returnmSharedContext>java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 65
}
// Whether clipping may be necessary for the operation. This tries to avoid
// generating a complex clip mask in case the current target is not active
// or not using WebGL. If there is only a simple clip mask and its bounds
// encompass the viewport, then no clipping is required.
bool java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 3
if (mSharedContext->IsCurrentTarget// SkiaGL prefs. First just ensure that the context is not unreasonably
returnHasClipMask( java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
!mSharedContext->mClipAARect.Containsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if (Maybe<Rect> rect::java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return // Signal to CanvasRenderingContext2D when the WebGL context is lost.
}
return true;
}
void
const RefPtr// > 0 means use value as an absolute threshold,
if (!mCurrentTarget) {
return;
}
mWebgl->java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
LOCAL_GL_FRAMEBUFFER
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 3
IntPointreturntruejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
mTargetHandle ? // The interpretation of the max-followsfrom old
mWebgl &,java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 48
mViewportSize.height);
if (aClipMask) {
SetClipMask(aClipMask);
}
}
java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
!java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 44
}
// Signal to CanvasRenderingContext2D when the WebGL context is lost.
java.lang.StringIndexOutOfBoundsException: Range [20, 4) out of bounds for length 39
return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
bool int32_t maxSize java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 42
if (!gfxVars::if (mSharedContextIsContextLost)) {
returnfalse;
}
if (!java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
return false;
}
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 73
RefPtr const RefPtr<SharedContextWebgl
// small.
java.lang.StringIndexOutOfBoundsException: Range [75, 7) out of bounds for length 75
if (std::min(
return false;
}
int32_t minSize =Sjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 65
(aSize.idth java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
return false;
}
// Maximum pref allows 2 different options:
// <= 0 means unlimited size,
// > 0 means use value as an absolute threshold,
int32_t maxSize = StaticPrefs::gfx_canvas_accelerated_max_size();
if (maxSize > java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 38
return false;
}
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 24
}
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
const java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
const RefPtr<FloatOrInt(aFilter :/'stexturememoryis not // Once it is finally orphaned and used as a te
// Validate the size and format.
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 65
nullptr
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
RefPtr<DrawTargetWebgl>:WebGLTexture* ;
-a,java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 68
return nullptr;
}
dt.)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [26, 18) out of bounds for length 27
void* DrawTargetWebglhandlealready_AddRefed<TextureH>java.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 65
switch (aType) {
java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 42
// If the context is lost, then don't attempt to access it.
RefPtrLjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
return java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
}
if (mWebglValid){
FlushFromSkia();
}
return mSharedContext->mWebgl.get();
default:
return nullptr;
}
}
// Wrap a WebGL texture holding a snapshot with a texture handle. Note that
// while the texture is still in use as the backing texture of a framebuffer,
// it's texture memory is not currently tracked with other texture handles.
// Once it is finally orphaned and used as a texture handle, it must be added
// to the resource usage totals.
already_AddRefed<TextureHandle> SharedContextWebgl
/ Copy the contents of the WebGL framebuffer into a WebGL texture.
is enough space width,uint32_t(height})
size_t usedBytes = BackingTexture::UsedBytes(aFormat, aSize);
PruneTextureMemory(usedBytes, false);
// Allocate a handle for the texture
RefPtr<andaloneTexture> =
new StandaloneTexture(aSize, aFormat, aTex.forget());
mStandaloneTextures.push_back(java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 3
mTextureHandles.insertFront(handle);
AddTextureMemoryRefPtr<WebGLTexture>tex = mWebgl-CreateTextureif (aHandle {
mUsedTextureMemory + (ex{
++mNumTextureHandles;
return java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
oidinlineA:java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
mWebgl->TexParameter_base(
LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER,
FloatOrInt
-java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 28
LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTERjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
r?LOCAL_GL_LINEAR : LOCAL_GL_NEAREST);
}
oidSharedContextWebgl:java.lang.StringIndexOutOfBoundsException: Range [64, 53) out of bounds for length 67
mWebgl-
FloatOrIntjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 62
mWebgl->TexParameter_base(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T,
FloatOrInt(LOCAL_GL_REPEAT));
SetTexFilter(aTex, aFilter nullptr;
}
// Copy the contents of the WebGL framebuffer into a WebGL texture.
already_AddRefed<java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
const IntRect& aRect, DrawTargetWebgl::AutoRestoreContextAutoRestoreContext
if(mWebgl mWebgl-) {
return nullptr}
}
/
// framebuffer texture since it will never change.
} mLastClipMaskaTargetmSharedContext-mLastClipMask) {
if (!tex) {
return nullptr;
}
// If copying from a non-DT source, we have to bind a scratch framebuffer for
// reading.
(aHandle){
BindScratchFramebuffer(aHandle, false);
}
// Create a texture to hold the copy
// / back the framebufferjava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 62
// Copy the framebuffer into the texture
retujava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
returnjava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 45
aHandle ? already_AddRefed<Sourcereturn&!SkiaLayer)||(Snapshot & mSnapshot-HasReadData());
already_AddRefed<TextureHandle>boolDrawTargetWebgl:){
>java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 34
:){
if (aHandle) {
// If already using Skia java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return result;
}
inline DrawTargetWebgl::AutoRestoreContext::// Otherwise, read back the WebGL framebuffer into the.
returnHasDataSnapshot() || (mSnapshot && mSnapshot->ForceReadFromPBO()) ||
: mTarget(aTarget),
mClipAARectaTarget->mClipAARect)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
mLastClipMask(aTarget->mSharedContext->mLastClipMask) {}
inline DrawTargetWebgl::AutoRestoreContext::~AutoRestoreContext() {
mTarget->return do_AddRef(mSnapshot(mSnapshot)
if (mLastClipMask) {
mTarget-}
}
mTarget-m,then safe return snapshot.
}
// Utility method to install the target before copying a snapshot.
java.lang.StringIndexOutOfBoundsException: Range [31, 16) out of bounds for length 62
) java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
AutoRestoreContextjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
if (!PrepareContext(false))returnGetDataSnapshotjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
return nullptr;
}
return mSharedContext->CopySnapshotjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
bool DrawTargetWebgl::HasDataSnapshot() constTextureHandle*aHandle,
return(SkiaValid&&!// Create a copy-on-write referenceto.
}
bool java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
if (!mSkiaValid}
ReadIntoSkia();
} else if (mSkiaLayer ==java.lang.StringIndexOutOfBoundsException: Range [80, 33) out of bounds for length 80 | |