Impressum DrawTargetWebgl.cpp
Sprache: C
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "DrawTargetWebglInternal.h"
#include "FilterNodeWebgl.h"
#include "GLContext.h"
#include "java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 27
#include "SharedSurface.h"
#include " file, You obtain one at http://mozilla.org/MPL/2.0/. */
java.lang.StringIndexOutOfBoundsException: Range [23, 8) out of bounds for lengt h 26
#.h
#include"GLContext.h"
#include "WebGLContext#include Sh"
# "WebGLFramebufferhjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
#.h
#include "include "h
#.h
#include " "SourceSurfaceWebgl"
#g "WebGLFramebuffebGLFramebuffer
#include "mozilla/java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 24
# mozillaHelperMacrosh"
#"
#include "include ""
# "mozilla/gfx/."
# m/java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 24
#include "mozilla/gfx/Helpersinclude "mozillaClearOnShutdown."
#nclude "mozilla/gfx/HelpersSkia.h"
#include "mozilla/gfx/#include "mozilla/StaticPrefs.h
include"mozilla/PathHelpers.h"
#include "mozilla/gfx/PathSkia.h"
#includeinclude mozilla/HelperMacros.java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
# mozillafxjava.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 32
#"ozillafx/fxVars.h"
#include "#nclude "mozilla/DataSurfaceHelpers"mozilla//.hjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
#nclude java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 44
# "java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 32
#ncludemozillafx/.h
#ifdefinclude "include "mozilla/gfx/Scale.h"
# includeinclude "//.java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
#ndif
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 44
static"nsContentUtils
staticAtomic<size_t>.h"
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
class
Atomicsize_t> gReportedContextCount;
public: s>;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [48, 36) out of bounds for length 49
MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREEMOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(MallocSizeOfOnAlloc)
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReportMOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(MallocSizeOfOnFree
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Range [28, 21) out of bounds for length 75
static Atomic<size_t> gReportedTargetCountjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
Acceleratedtextures)
PUmemorybyjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
Canvas2Djava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 55
", java.lang.StringIndexOutOfBoundsException: Range [55, 22) out of bounds for length 69
gReportedContextCount
g gReportedContextCount KIND_OTHER,UNITS_BYTES,
MOZ_COLLECT_REPORT("-target Canvas2Dcontexts."java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
,
AcceleratedCanvas2D .
g,
}"java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 17
static void Registerstatic booljava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 35
MOZ_COLLECT_REPORT-
registered = true;
RegisterStrongMemoryReporter(
MakeAndAddRef<AcceleratedCanvas2DMemoryReporter>());
}
}
};
NS_IMPL_ISUPPORTS(AcceleratedCanvas2DMemoryReporter, nsIMemoryReporter)
BackingTexture}
const RefPtr<WebGLTexture>& aTexture}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
ize) a, aTexture) }
#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.
static const Etagere::AllocatorOptions java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 59
#endif
SharedTexture::// alignment. This does not :: kR8AllocatorOptions= 16 , ,0}
)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
(
#ifdef XP_WIN
: BackingTextureaSize aFormat aTexture),
? Etagere::etagere_atlas_allocator_with_options(
aSize.java.lang.StringIndexOutOfBoundsException: Range [45, 31) out of bounds for length 68
:
#endif
iXP_WIN
aFormat = SurfaceFormat::A8
SharedTexture::SharedTexture()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
"Number of Accelerated Canvas2D targets. :
java.lang.StringIndexOutOfBoundsException: Range [43, 11) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
}
}
SharedTextureHandle::haredTextureHandleEtagere::AllocationId aId,
IntRect java.lang.StringIndexOutOfBoundsException: Range [63, 63) out of bounds for length 61
aTexture)
if!){
already_AddRefed<SharedTextureHandle> SharedTexture::const IntRect& aBoundjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 24
<cceleratedCanvas2DMemoryReporter)
Etagere:Allocation alloc {, ,0 } :INVALID_ALLOCATION_ID
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 2
!: mAllocationId) mBounds(Bounds) mTextureaTexture }
aSize.height, &alloc) ||
alloc.id W&java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
}
RefPtrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// the row length. Extra space is reserved at the end of each row up to stride
static :kR8AllocatorOptions {16 1,0}java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 75
)java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
returnalloc.d== Etagere::INVALID_ALLOCATION_ID) (,aFormataTexture,
}
bool SharedTexture?java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 62
)
return false;
}return handle.orget(;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if( java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
Etagereetagere_atlas_allocator_deallocatejava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 33
aHandle)
}
aHandle.mAllocationId = Etagere::INVALID_ALLOCATION_ID;
}
mAtlasAllo =nullptr
}
StandaloneTexture::}
,
const RefPtr *aTexture)
: BackingTextureallocd= :){
DrawTargetWebgl
nevoidSharedContextWebgl:(
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 3
if (aFullClear) {
=nullptr
}
}
// 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:ClearSnapshot(ool , java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
return
}
mSharedContextfalse
RefPtrSourceSurfaceWebgl = .(;
(napshot>hasOneRef()) {
;
}
if ( if(mAtlasAllocator)java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 26
snapshots bejava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 77
/// this target, then it should simply be destroyed. If it is a WebGL surface in
snapshot->DrawTargetWillChangejava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 14
{
// If not copying, then give the backing texture to the surface for reuse.
}
->WrapSnapshotGetSize(,GetFormat() mTexforget))java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
}
}
DrawTargetWebgl::~DrawTargetWebgl() {
ClearSnapshot ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 11
// anySkia copy shmem beforeit
() hmust notified java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 77
ots()
}
// {
if (mClipMask java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 77
mSharedContext>java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 19
=java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 3
}
nullptrjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
if (mSharedContext java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
mTex
}
// changing so that it can copy the data.can
DrawTargetWillChange)
}else
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
SharedContextWebgl::
if
awTargetWebgl:~DrawTargetWebgl( java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 27
/
)
// Detect context loss before deletion.
)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
mSharedContext)
mClipMaskjava.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 43
}
if m java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
releasejava.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 30
}
if(java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 43
mWGROutputBuffer=nullptr;
}
if (java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 3
DetachWeakPtr)
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 32
}
() {
ClearAllTextures();
UnlinkSurfaceTextures if (mWGROutput java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25
)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
ClearSnapshotPBOsRemoveUntrackedTextu;
}
= java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
?>( :nullptr;if m {
}
void SharedContextWebgl java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 22
() {
;
} java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 20
g java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 30
mTlsScope
gl:java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 51
= -(:java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
}
}
void if (mTlsScope.isSome
ifg: java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
gljava.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 43
gl->mUseTLSIsCurrent = mTlsScope- =;
}
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 1
// Remove any SourceSurface user data associated with this TextureHandle.
inline;
TextureHandle>&java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 56
(> =aHandle>){
// Ensure any WebGL snapshot textures get unlinked.;
-java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 45
}
- java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 24
}
surface-> java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 53
}
}
// Unlinks TextureHandles from any SourceSurface user data.
java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 1
R< = :java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53
handle = handle->getNext() constif(-(=WEBGL)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
UnlinkSurfaceTexture(andle,aForce)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
}
// Unlinks GlyphCaches from any ScaledFont user data.
void SharedContextWebgl:java.lang.StringIndexOutOfBoundsException: Range [25, 5) out of bounds for length 5
GlyphCache .)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
while (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ScaledFont* -r(< java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 73
// Access the next cache before removing the user data, as it might destroy){
// the cache.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
(java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 42
}
}
handle = handle-=>){
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 3
ClearCachesIfNecessary( java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
// Clear out the entire list of texture handles from any source.
void : java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 40
/
(;
- java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 21
}
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
returnaTexture-MemoryUsage()
}
static inline size_t PruneTextureHandle:java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 40
)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
voidjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 63
if (aBuf) {
return aBuffer()
:MallocSizeOfOnAllocaBuf)
}
}
inline void void SharedContextWebglAddHeapData(onstvoid*)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
if (aBuf) {
gReportedHeapData -=
}
}
}
void :java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [28, 24) out of bounds for length 35
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ReportedTextureMemory -aBytesjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
template <typename T>
inline void SharedContextWebgl:: gReportedTextureMemory
<T& aObject,size_t}
size_t usedBytes aBuf
template <typename T>
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 24
AcceleratedCanvas2DMemoryReporter::MallocSizeOfOnAllocconstRefPtr<T& aObject, size_t ) {
}
template <typename (java.lang.StringIndexOutOfBoundsException: Range [10, 1) out of bounds for length 39
nlinegReportedHeapData + -SizeOfIncludingThis(
const AcceleratedCanvas2DMemoryReporter::MallocSizeOfOnFreeaBuf);
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [1, 30) out of bounds for length 1
inline SharedContextWebgl:RemoveUntrackedTextureMemory
dCanvas2DMemoryReporterjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 35
}
aObject->(
=aBytesjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
mTotalTextureMemory +java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
AddUntrackedTextureMemory(-etWebGLTexture(, );
}
inline inline void SharedContextWebgl:: AddUntrackedTextureMemory(aTexture-() )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
usedBytes=aBytes aBytes :TextureMemoryUsage)
mTotalTextureMemory usedBytes;
RemoveUntrackedTextureMemory->GetWebGLTexture) );
}
// Scan through the shared texture pages looking for any that are empty and
// delete them.
void SharedContextWebgl::ClearEmptyTextureMemory() {
( Scan through the shared texture pages looking for any // delete them.
if(*)() {
RefPtr<SharedTexture> shared = * for (utopos =java.lang.StringIndexOutOfBoundsException: Range [17, 1) out of bounds for length 1
mEmptyTextureMemory -shared-if !*os-HasAllocatedHandles(){
RemoveTextureMemory(shared RefPtr<>shared = *os;
pos mSharedTextureserasep)
} else {
++pos;
}
}
}
void SharedContextWebgl:: else{
if (mZeroBuffer size_t =aBytes>0 TextureMemoryUsage();
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
mZeroBuffer= nullptrjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
gReportedHeapData (ZeroBuffer;
// 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.
void SharedContextWebgl::ClearCachesIfNecessary()java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if (!java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
return;
}}
ClearZeroBuffer();
ClearAllTextures();
if mTotalTextureMemory += usedBytes// are still empty texture pages being kept around, then clear those too.
voidSharedContextWebgl::ClearCachesIfNecessary() { AddUntrackedTextureMemory((aTexture->etWebGLTexture() (mShouldClearCaches.exchange(false)) {
}
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 3
ClearSnapshotPBOs(;ClearAllTextures)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
// Try to initialize a new WebGL context. Verifies that the requested size does
// not exceed the available texture limits and that shader creation succeeded.
bool :Init( IntSizesize format,
const }
switch
Clear(;
SurfaceFormat::
break
// Try to initialize a new WebGLre limitsand bool DrawTargetWebgl::Init(const IntSize& size, const Surf
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 72
alse
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 3
mSize =java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 33
mFormat =(UnsupportedDrawTargetWebgl)
! | aSharedContext>sContextLost()|
aSharedContext->java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 3
:()) java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
return
}
mSharedContext = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
mSharedContextStaticPrefs:() {
gReportedTargetCount++;
if(size_tstd:(size.width height)> (;
mZeroBuffer ;
}
if ( mSharedContext=/java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
// then first clearmSharedContext->DrawTargetCount++java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
}
<ize_t (ShouldClearCachesexchange() {
return;
ifjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return false;
}
size_t
mozilla: (java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
if java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
MOZ_ASSERT_UNREACHABLE"Buffer ?";
return mSizeClearEmptyTextureMemory)
}
/Thehandle must to preventresizing orwriting
auto handle = size_t shmemSizejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
((!handle)){
return false;
}
// Try to initialize a toinitializea WebGL context.Verifies that the requested size does
if (NS_WARN_IF(!mapping)) { }
return // The handle be java.lang.StringIndexOutOfBoundsException: Range [75, 30) out of bounds for length 75
}
:tie(ShmemHandle mShmem)=
std:java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 33
;
false
}
mSkia = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
auto =formatjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if :(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 17
}
if (!mSkia java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
:,true)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
;
}
// Allocate an unclipped copy of the DT pointing to its data.
uint8_t* =nullptr;
IntSize return;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
SurfaceFormat dtFormat :U;
SurfaceFormat: )){
return false;
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 35
ifmSkiaNoClipjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
mSkia->ReleaseBits(dtData);
return false;
}
if () java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
I()eturn java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
return returnjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 19
}
// If a non-recoverable error occurred that would stop the canvas from initing.
static {;
>:( java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
if (.(){
return nullptr;
}
RefPtr<options.stencil false;
}
return nullptr;
}
return sharedContext. =;
}
coconst bool :ShouldResistFingerprinting
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 48
.isWebgl2 trueSurfaceFormat::,){
options.alpha = true;
;
principalKey }
optionsantialias java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
options.java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 4
options.= false
bool resistFingerprinting = nsContentUtils int32_t = 0;
java.lang.StringIndexOutOfBoundsException: Range [50, 15) out of bounds for length 52
auto initDescs&dtData dtSize &dtStride, dtFormat) {
. java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
sContextInitError ;
.= {,1}java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
.options }
-R(;
webgl::InitContextResultmWebgl=;
mWebgl }
if (!mWebgl=nitResultlimits.;
/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
sContextInitError = java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
}
/ If context initialization would fail, don't even try to create a context.
mWebgl = nullptr;
return false;
}
mMaxTextureSize = initResult.limits.maxTex2dSize;
if (kIsMacOS) {
= . =gl::;
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if (!CreateShaders()) {
// There was a non-recoverable error when trying to init shaders.
bool SharedContextWebgl::Initialize()
nullptr
return false; true
}
inline =truejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
=java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
return =java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
inline void ", Wjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 62
>{,aSrcFactor, , aDstFactor)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 80
}
size={, 1,
= & LastBlendColor=&java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 56
if (aOp java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 27
mLastBlendStage=aStage java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
return;
}
mLastCompositionOp = aOp;
mLastBlendColor
mLastBlendStage ;
/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
// cause a toggle in AA state. Certain ops such as OP_SOURCE require output
d requiretwo
// stage blending which can incur a substantial performance penalty, so to
// work around this currently we just disable AA for those ops.
bool java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 16
=. =gl::ATI
case CompositionOp::OP_OVER
if a // If a colcolor is supplied,thenweblend subpixeltext.
// If a color is supplied, then we blend subpixel text.
mWebgl
BlendFunc(LOCAL_GL_CONSTANT_COLOR,LOCAL_GL_ONE_MINUS_SRC_COLOR)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
} else {
(,java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 62
}
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 3
:
case CompositionOp gReportedContextCount+
return truereturn true;
break;
case case SharedContextWebgl:BlendFunc( aSrcFactor,
BlendFunc( java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
break;
case CompositionOp:OP_ATOP:
BlendFunc(LOCAL_GL_DST_ALPHA, LOCAL_GL_ONE_MINUS_SRC_ALPHA);
case void SharedContextWebgl:SetBlendState(CompositionOp aOp,
if (aColor) {
const Maybe<DeviceColor>& aColor,
BlendFunc & == &
// while filling the interior with the unaltered color. Normally thiselse =){
// would require dual source blending, but we can emulate it with only aOpjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
or
/
BlendFunc(LOCAL_GL_CONSTANT_COLOR, /java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
else// work around this currently we just disable AA for those ops.
enabled // Map the composition op to a WebGL blend mode, if possible.
}
breakjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
case ){
// Assume the source is an alpha mask for clearing. Be careful to blend inCompositionOp::
// the correct alpha if the target is opaque.
mWebgl->BlendFuncSeparate case0:
{, ,java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
// } else
LOCAL_GL_ONE_MINUS_SRC_ALPHA);
break;
case CompositionOpcase :OP_DEST_OVER breakjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
switch (java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 12
L ;
0java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
L, break;
break;
- Cs( )+* )+*Cd
case 1:
BlendFuncLjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 70
break
java.lang.StringIndexOutOfBoundsException: Range [34, 19) out of bounds for length 64
break;
}
/Ifa ,then we ;
caseCompositionOp::
LOCAL_GL_ONE java.lang.StringIndexOutOfBoundsException: Range [60, 58) out of bounds for length 60
break casere source blending wecanemulate itwith
case mWebgl->BlendColor->,aColor>, >,java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Range [35, 15) out of bounds for length 51
{
case java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 7
BlendFuncLOCAL_GL_ONE_MINUS_DST_ALPHALOCAL_GL_ZERO;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/ Assume thesource alpha mask for clearing carefulto in
BlendFunc // the correct alpha if the target is opaque.
break;
case CompositionOp::OP_DEST_ATOP: // unbounded
BlendFunc(LOCAL_GL_ONE_MINUS_DST_ALPHA,OCAL_GL_SRC_ALPHA)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
break;
default:
enabled =alse
break;
}
-, { java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
// Ensure the WebGL framebuffer is set to the current target.
:DrawTargetWebgl ,
/ Multi-stage, decompose into [Cs*(1 - Ad)] + [Cd*(1 - As) + Cs*Cd]
if(mWebgl| mWebgl->sContextLost()) {
return false;
}
if (aDT !break
mCurrentTarget =aDT;
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 28
IntRect bounds;
if (aHandle) {
tRect java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
mTargetFramebuffer =mWebgl->CreateFramebuffer();
}
mWebgl->BindFramebuffer( if !mTargetFramebuffer case CompositionOp:OP_SCREENjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
webgl::java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 7
attachInfo.tex break;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
LOCAL_GL_COLOR_ATTACHMENT0,,
attachInfo);
= -GetBoundsmWebgl-FL,
;
mWebgl--( ->)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
=->(;
}
break
:.(;
( java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 22
}
return break;
}
// Replace the current clip rect with a new potentially-AA'd clip rect.
void SharedContextWebgl::SetClipRect( }
/ Only invalidate the clip rect if it actually changes.
if (!// Ensure the WebGL framebuffer is set to the current SharedContextWebgl:(* ,
const&) java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
/
mClipRect = mViewportSize.);
}
}
bool SharedContextWebgl::SetClipMask(}
ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
return java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
mWebgl->ActiveTexture(1);
mWebgl>(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
mWebgl-> mWebgl->ramebufferAttach(,
mLastClipMask = aTex;
}
return true;
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 29
bool::SetNoClipMask( {
if (mNoClipMask) {
returnSetClipMaskmNoClipMask);
}
if (!mWebgl) {
return false;
}
l->reateTexture)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
if (!mNoClipMask) {
returnlipMask){
}
mWebgl->ActiveTexture }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
voidSharedContextWebgl:(onstjava.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 17
ay(!mClipAARect.IsEqualEdges){
(0,,{,0 }
{// Store the integer-aligned
{,
{1,
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
(s}};
InitTexParameters(mNoClipMask,false);
mWebgl static const auto solidMask =
std:array<const uint8_t, > f (Webgl) {
return true;
}
mWebgl {LOCAL_GL_RGBA,LOCAL_GL_UNSIGNED_BYTE},
const DrawTargetWebgl::ClipStack& aOther) java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 40
// Verify the transform and bounds match.
if gfxAlphaType:java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 25
!IsEqualInterior())java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
return falsejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
// Verify the paths match.
return ! return SetClip;
}
if (! return fafalse;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
falsejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
mWebgl->java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 27
return mPath == aOther.mPath;
}
static_cast !aOther.)|
static_cast uint8_t 4>xFF,0xFF, >0, 0 ,0,
}
// 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.
bool DrawTargetWebgl::java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 3
if (! InitTexParameters, );
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
// If the clip mask was already generated, use the cached mask and bounds.java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
-()
const:&aOther {
return true;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if (!return static_cast if (!mTransform.FuzzyEquals.)|java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
/Ifthe targetcurrently ,we t render themask
// in it.
return false;
}
RefPtr<WebGLContext ! java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
if (!webgl) {
return false;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
bool init = false;
bool DrawTargetWebgl: }
mClipMask -(;
if !) ! | & mCachedClipStack=) {
return false return static_cast *(get)-( =
}
init =true
}
// Try to get the bounds of the clip to limit the size of the mask.// If the clip region can't be approximated by a simple clip rect, then we need
if//render to theSkia // opaque inside,and upload // opaque inside, and upload this( {
mClipBounds =*lip;
} if (!mWe)alse;
// If the clip mask was already generated, use the cached mask and bounds.
mClipBounds = GetRect();
}
mClipAARect = Rect(mClipBounds);
//
// all pixels get filled with an empty mask regardless. Otherwise, restrict
// uploading to only the clip region.
<java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 3
if (!dt // If the Skia target is currently being used, then we can't render the mask
ifreturn ;}
// Ensure that the clip mask is reinitialized on the next attempt.
mClipMask = nullptr;
}
return false;
}
// Set the clip region and fill the entire inside of it
return false;
mCachedClipStack.clear() }
bool init= false;
// Record the current state of the clip stack for this mask.
java.lang.StringIndexOutOfBoundsException: Range [30, 20) out of bounds for length 42
dt-> if (Maybe<IntRectclip mSkia-GetDeviceClipRect java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
Matrix(...ostTranslate(mClipBounds.opLeft()
} else
dt->PushClip( java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}else {
dt-(mRect;
}
}
dt->SetTransform(Matrix::// all pixels get filled with an empty// uploading to only the clip region.
dtFRmClipBounds,((,1 ,1);
// Bind the clip mask for uploading. This is done on texture unit 0 so that
aroundWindows ontexture 1java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
ver doesn't notice that the texture contents was modified. Force a
/ - for:mClipStack)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
webgl-Bjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
if() java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Range [37, 18) out of bounds for length 56
}for(&clipStack :mClipStack)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
RefPtr<>java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
>(mRect;
();
}
>(:(TopLeft()java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
// necessary.
if (init && mClipBounds. // Bind the clip mask for uploading. This is done on texture unit 0 so that
mSharedContext->UploadSurface( / the driver doesn't notice that the texture contents was modified. Force a
IntPoint,, ;
init eindTexture ;
}
dtdt-PushClipRect( mSharedContext->InitTexParam(,false)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
ntRect(() mClipBounds.Size())java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
mClipBounds.() init)
mSharedContext-> dt->FillRect(Rect(mClipBounds)data=snapshot->GetDataSurface();
// Bind the new clip mask to the clip sampler on texture unit 1.
mSharedContextS(ClipMask)
mSharedContext-> // we can work around
// We uploaded a surface, just as if we missed the texture cache, so account (init &&mClipBoundsSize( /java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
// for that here.
if ( ( ,)
mSharedContext->java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
mProfile.OnCacheMiss();
return ! mSharedContext-InitTexParametersmClipMask, false;
}
Maybe<Rect> DrawTargetWebglmSharedContext-SetClipMask(mClipMask;
// Determine whether the clipping rectangle is simple enough to accelerate.
// Check if there is a device space clip rectangle available from the Skia->SetClipRect(mClipBounds)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
// target.
if (nit) {
}
// trivially discard the draw request.
// necessary.
!tajava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
if (!clip->java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
clip = IntPoint(), // Determine whether the clipping rectangle is simple enough to accelerate.
}
return / .
}
// 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.
Rect rect(GetRect());
for (autoif !>)& -Contains(GetRect()))mClipBounds.TopLeft(), init);
/Ifclip is path it nonaxisaligned,thenit
// complex.
if (clipStack.
!.mTransform.PreservesAxisAlignedRectanglesSharedContext-SetClipRect(mClipBounds);
return Nothing(;
}
/ Transform the rect and intersect it with the current clip.
rect =
clipStack.TransformBoundsc.mRect) java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 57
}
return Rect rect(GetRect;
}
bool DrawTargetWebgl:() java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
if Maybe< clipStack.. |
/ Determine whether the clipping rectangle is simple enough to accelerate.
mSharedContext->SetNoClipMask();
Nothing)
}
return false;
}
// 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
RefPtrTextureHandle&,
&){
(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
mSharedContext->SetClipRect(
aHandle
? IntRect(IntPoint(), !aViewportSize.IsEmpty(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
? (-GetSize) )
: // see if there is an AA'd axis-aligned rectangle clip.
: ;
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
// Ensure the clip gets reset if clipping is later requested for the target.
mRefreshClipState = true;
} else if (mRefreshClipState || !mSharedContext(lipStackmPath ||
/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
// generating a clip mask texture that can represent complex clip regions.
if(SetSimpleClipRect)& GenerateComplexClipMask() {
return false;
}
mClipChanged =false;
mRefreshClipState = false;
}
return java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
}
// 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 DrawTargetWebgl::ShouldClip() {
if (mSharedContext->IsCurrentTarget(this) && !mRefreshClipStatemSharedContext-SetNoClipMask returntrue;
return mSharedContext->HasClipMask() ||
ntext>false
}
if Maybe<java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 0
return rect-Contains((etRectamebuffer to the current target.
}
return true
}
void SharedContextWebgl::RestoreCurrentTarget(
RefPtrW>&aClipMask){
if (!mCurrentTarget) {
return;
}
mWebgl->mClipChanged ;
LOCAL_GL_FRAMEBUFFER,
mRefreshClipState =java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
IntPoint offset=
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
mWebgl->Viewport(offset. ? IntRect(ntPoint(), !aViewportSize.IsEmpty()
mViewportSize.height);
if (aClipMask// generating a complex clip mask in case the current target is not active
SetClipMask(// or not using WebGL. If there is only a simple clip mask and its bounds
}
}
boolSharedContextWebgl:s( const java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
return !mWebgl ||//Ensure clip xt->(()|
}
// Signal to CanvasRenderingContext2D when the WebGL context is lost.
bool DrawTargetWebgl: else if( java.lang.StringIndexOutOfBoundsException: Range [16, 10) out of bounds for length 44
return mSharedContext java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
DrawTargetWebgl:CanCreateconst &aSize }
if (!gfxVars::UseAcceleratedCanvas2Dreturn mSharedContext-SetTarget(this ,
return false;
}
if/ benecessaryfortheoperation triesto
return iewportoffset.,./or usingWebGLIf is a simple mask and bounds
}
// The interpretation of the min-size and max-size follows from the old
// SkiaGL prefs. First just ensure that the context is not unreasonably
// small.
const mSharedContext-)|
if (std
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
aticPrefs:java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 1
if (aSize.width * aSize.java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 44
returnboolDrawTargetWebgl:java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 3
}
// Maximum pref allows 2 different options:
// <= 0 means unlimited size,
// > 0 means use value as an absolute threshold,
int32_t java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 24
if (maxSize > 0 && std::max(aSize. }
return false;
return true;
}
// The interpretation of the min-size and max-size follows from the oldsize java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 73
IntSize&Size,,SurfaceFormataFormat,
const RefPtr<SharedContextWebgl>& aSharedContext) {
// Validate the size and format.
if !(, )){
return nullptr;
}
RefPtr<DrawTargetWebgl> dt = newjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(!return Webgl | mWebgl->sContextLost();
return java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 1
}
return bool DrawTargetWebgl::IsValid() }
}
void* DrawTargetWebgl::GetNativeSurface(NativeSurfaceType // <= 0 means unlimited size,
// > 0 means use value as an absolute threshold,
NativeSurfaceType::WEBGL_CONTEXT:
// If the context is lost, then don't attempt to access it.
->IsContextLost() java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
return nullptr;
}
if java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
();
}
return mSharedContext->mWebgl.getalready_AddRefed<java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 3
oftheminsize -
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.
tureHandle>haredContextWebgl:WrapSnapshot(
const IntSize& aSize, SurfaceFormat aFormat, if(aSize.idth*returnnullptr;
// Ensure there is enough space for the texture.
size_t usedBytes = java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 21
PruneTextureMemory(usedBytes // Maximum pref allows 2 different options:
// Allocate a handle for the texture
RefPtrStandaloneTexture>handle =
new StandaloneTexture(aSize, aFormat, aTex.forget());
.push_back);
.nsertFront)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
AddTextureMemory(handle);
mUsedTextureMemory += usedBytes;
++mNumTextureHandles
return handle.return )
}
void SharedContextWebgl::already_AddRefed java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
mWebgl->TexParameter_base(
LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER,
? LOCAL_GL_LINEAR /it texture memory isnot currentlyxture handle, it must be added
mWebgl->TexParameter_baseifalready_AddRefed<TextureHandle> SharedContextWebgl::WrapSnapshot(
return nullptr;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
void SharedContextWebgl:InitTexParameters(WebGLTexture*java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 39
mWebgl /if (!dt>,Format |!t-(){
FloatOrInt())java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
mWebgl->TexParameter_base(LOCAL_GL_TEXTURE_2Djava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
FloatOrInt(LOCAL_GL_REPEAT));
AddTextureMemory;
}
// Copy the contents of the WebGL framebuffer into a WebGL texture.
TextureHandle:(
const java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
if !| ::
return nullptr;
}
// If the target is going away, then we can just directly reuse the
ce it willnever change.
CAL_GL_TEXTURE_2D,OCAL_GL_TEXTURE_MIN_FILTER,
if (!tex) {
return nullptr;
}
// If copying from a non-DT source, we have to bind a scratch framebuffer for
// reading.
if ! java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
// Wrap a WebGL texture holding a snapshot with a texture handle. Note thatFloatOrInt)
}-TexParameter_baseLOCAL_GL_TEXTURE_2D LOCAL_GL_TEXTURE_WRAP_T
// Create a texture to hold the copy
BindAndInitRenderTex(tex SurfaceFormat
// Copy the framebuffer into the texture
mWebgl/java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
. uint32_tjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
SurfaceFormat format =
aHandle ? aHandle->if! |mWebgl RefPtrS> handle =
nullptr
WrapSnapshot(
// framebuffer texture since it will never change.
(){
RestoreCurrentTarget( mUsedTextureMemory!ex java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
return
}
inline::toRestoreContext:AutoRestoreContext(
DrawTargetWebgl* aTarget)
mTarget(aTarget),
mClipAARect}
mLastClipMask(aTarget->mSharedContext->mLastClipMask
inline mWebgl->CopyTexImage,,(
->()java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
if (SurfaceFormat format java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 64
mTarget->mSharedContext->SetClipMask(mLastClipMaskv SharedContextWebglaHandle ?aHandle-GetFormat( mCurrentTarget-GetFormat(;
}
mTarget->mRefreshClipState = true;
}
// Utility method to install the target before copying a snapshot.
already_AddRefed<extureHandle>DrawTargetWebgl:CopySnapshot(
const IntRect& (aHandle){
AutoRestoreContext restore(this);
if (!PrepareContext(false)) {
return java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
}
return mSharedContext->CopySnapshot(aRect);
}
bool java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 51
return (mSkiaValid & DrawTargetWebgl*aTarget) (!mWebgl | mWebgl-sContextLost() {
}
bool DrawTargetWebgl::PrepareSkia() {
if (!mSkiaValid) / If the target is going away, then we can just directly reuse the:mTargetaTarget),
ReadIntoSkia)
}else aTarget>java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 62
FlattenSkia();
}
mSkiaValid
}
:java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 16
a
// snapshot that has a pending PBO readback, then try to force the readback.
/Otherwise,readback WebGLframebuffer:CopySnapshotjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
return HasDataSnapshot() |AutoRestoreContextrestore(his)
PrepareSkia)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
void ->CopySnapshot(Rect)
// Borrow a snapshot that may be used by another thread for composition. Only
// Skia snapshots are safe to pass around.
Surfacereturn (SkiaValid & ! | m& >java.lang.StringIndexOutOfBoundsException: Range [78, 76) out of bounds for length 80
PrepareSkia();
return mSkia->Snapshot( if(mSkiaValid) {
ready_AddRefed<SourceSurface>DrawTargetWebgl:Snapshot( java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
the Skia java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
if}
return bool:
}
// There's no valid Skia snapshot, so we need to get one from the WebGL
// context.
if (!mSnapshot) {
// Create a copy-on-write reference to this target.(-mSharedContext->mClipAARect)
mSnapshot = new SourceSurfaceWebgl(java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 62
}
return do_AddRef(mSnapshot;
}
// If we need to provide a snapshot for another DrawTargetWebgl that shares the
// same WebGL context, then it is safe to directly return a snapshot. Otherwise,
// we may be exporting to another thread and require a data snapshot.
already_AddRefed
DrawTarget* aTarget) {
if// Borrow a snapshot that may be used by another thread for composition. Only
static_cast<DrawTargetWebgl*>(aTarget)->mSharedContext a<already_AddRefed<TextureHandle DrawTargetWebgl:CopySnapshotjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 | |