Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
9a52bad4
Kaydet (Commit)
9a52bad4
authored
Kas 01, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
android: don't crash in TextureReaper when Integer is null
Change-Id: I1514aa7a3fbab682b0d282ba0f504470943d7e4a
üst
6d9124de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
TextureReaper.java
.../source/src/java/org/mozilla/gecko/gfx/TextureReaper.java
+16
-7
No files found.
android/source/src/java/org/mozilla/gecko/gfx/TextureReaper.java
Dosyayı görüntüle @
9a52bad4
...
...
@@ -6,6 +6,7 @@
package
org
.
mozilla
.
gecko
.
gfx
;
import
android.opengl.GLES20
;
import
android.util.Log
;
import
java.util.ArrayList
;
...
...
@@ -14,28 +15,30 @@ import java.util.ArrayList;
*/
public
class
TextureReaper
{
private
static
TextureReaper
sSharedInstance
;
private
ArrayList
<
Integer
>
mDeadTextureIDs
;
private
ArrayList
<
Integer
>
mDeadTextureIDs
=
new
ArrayList
<
Integer
>();
private
static
final
String
LOGTAG
=
TextureReaper
.
class
.
getSimpleName
();
private
TextureReaper
()
{
mDeadTextureIDs
=
new
ArrayList
<
Integer
>();
}
public
static
TextureReaper
get
()
{
if
(
sSharedInstance
==
null
)
if
(
sSharedInstance
==
null
)
{
sSharedInstance
=
new
TextureReaper
();
}
return
sSharedInstance
;
}
public
void
add
(
int
[]
textureIDs
)
{
for
(
int
textureID
:
textureIDs
)
for
(
int
textureID
:
textureIDs
)
{
add
(
textureID
);
}
}
public
void
add
(
int
textureID
)
{
public
synchronized
void
add
(
int
textureID
)
{
mDeadTextureIDs
.
add
(
textureID
);
}
public
void
reap
()
{
public
synchronized
void
reap
()
{
int
numTextures
=
mDeadTextureIDs
.
size
();
// Adreno 200 will generate INVALID_VALUE if len == 0 is passed to glDeleteTextures,
// even though it's not supposed to.
...
...
@@ -44,7 +47,13 @@ public class TextureReaper {
int
[]
deadTextureIDs
=
new
int
[
numTextures
];
for
(
int
i
=
0
;
i
<
numTextures
;
i
++)
{
deadTextureIDs
[
i
]
=
mDeadTextureIDs
.
get
(
i
);
Integer
id
=
mDeadTextureIDs
.
get
(
i
);
if
(
id
==
null
)
{
deadTextureIDs
[
i
]
=
0
;
Log
.
e
(
LOGTAG
,
"Dead texture id is null"
);
}
else
{
deadTextureIDs
[
i
]
=
mDeadTextureIDs
.
get
(
i
);
}
}
mDeadTextureIDs
.
clear
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment