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
e774a6ff
Kaydet (Commit)
e774a6ff
authored
Nis 23, 2015
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use shared_ptr for OpenGLPrograms, and hide its copy constructor.
Change-Id: Ia1352105acef1ededaf876a224ebc277121d6942
üst
3b778890
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
OpenGLContext.hxx
include/vcl/opengl/OpenGLContext.hxx
+1
-1
program.hxx
vcl/inc/opengl/program.hxx
+1
-0
OpenGLContext.cxx
vcl/source/opengl/OpenGLContext.cxx
+6
-8
No files found.
include/vcl/opengl/OpenGLContext.hxx
Dosyayı görüntüle @
e774a6ff
...
@@ -275,7 +275,7 @@ private:
...
@@ -275,7 +275,7 @@ private:
OUString
fragmentShader
;
OUString
fragmentShader
;
OString
preamble
;
OString
preamble
;
};
};
boost
::
ptr_map
<
ProgramKey
,
OpenGLProgram
>
maPrograms
;
std
::
map
<
ProgramKey
,
boost
::
shared_ptr
<
OpenGLProgram
>
>
maPrograms
;
OpenGLProgram
*
mpCurrentProgram
;
OpenGLProgram
*
mpCurrentProgram
;
#ifdef DBG_UTIL
#ifdef DBG_UTIL
std
::
set
<
SalGraphicsImpl
*>
maParents
;
std
::
set
<
SalGraphicsImpl
*>
maParents
;
...
...
vcl/inc/opengl/program.hxx
Dosyayı görüntüle @
e774a6ff
...
@@ -39,6 +39,7 @@ private:
...
@@ -39,6 +39,7 @@ private:
TextureList
maTextures
;
TextureList
maTextures
;
bool
mbBlending
;
bool
mbBlending
;
OpenGLProgram
(
const
OpenGLProgram
&
notImplemented
);
public
:
public
:
OpenGLProgram
();
OpenGLProgram
();
~
OpenGLProgram
();
~
OpenGLProgram
();
...
...
vcl/source/opengl/OpenGLContext.cxx
Dosyayı görüntüle @
e774a6ff
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <vcl/sysdata.hxx>
#include <vcl/sysdata.hxx>
#include <boost/scoped_array.hpp>
#include <boost/scoped_array.hpp>
#include <boost/make_shared.hpp>
#include <vcl/pngwrite.hxx>
#include <vcl/pngwrite.hxx>
#include <vcl/bmpacc.hxx>
#include <vcl/bmpacc.hxx>
#include <vcl/graph.hxx>
#include <vcl/graph.hxx>
...
@@ -1588,20 +1589,17 @@ OpenGLProgram* OpenGLContext::GetProgram( const OUString& rVertexShader, const O
...
@@ -1588,20 +1589,17 @@ OpenGLProgram* OpenGLContext::GetProgram( const OUString& rVertexShader, const O
{
{
ProgramKey
aKey
(
rVertexShader
,
rFragmentShader
,
preamble
);
ProgramKey
aKey
(
rVertexShader
,
rFragmentShader
,
preamble
);
boost
::
ptr_map
<
ProgramKey
,
OpenGLProgram
>::
iterator
std
::
map
<
ProgramKey
,
boost
::
shared_ptr
<
OpenGLProgram
>
>::
iterator
it
=
maPrograms
.
find
(
aKey
);
it
=
maPrograms
.
find
(
aKey
);
if
(
it
!=
maPrograms
.
end
()
)
if
(
it
!=
maPrograms
.
end
()
)
return
it
->
second
;
return
it
->
second
.
get
()
;
OpenGLProgram
*
pProgram
=
new
OpenGLProgram
;
boost
::
shared_ptr
<
OpenGLProgram
>
pProgram
=
boost
::
make_shared
<
OpenGLProgram
>
()
;
if
(
!
pProgram
->
Load
(
rVertexShader
,
rFragmentShader
,
preamble
)
)
if
(
!
pProgram
->
Load
(
rVertexShader
,
rFragmentShader
,
preamble
)
)
{
delete
pProgram
;
return
NULL
;
return
NULL
;
}
maPrograms
.
insert
(
aKey
,
pProgram
);
maPrograms
.
insert
(
std
::
pair
<
ProgramKey
,
boost
::
shared_ptr
<
OpenGLProgram
>
>
(
aKey
,
pProgram
)
);
return
pProgram
;
return
pProgram
.
get
()
;
}
}
OpenGLProgram
*
OpenGLContext
::
UseProgram
(
const
OUString
&
rVertexShader
,
const
OUString
&
rFragmentShader
,
const
OString
&
preamble
)
OpenGLProgram
*
OpenGLContext
::
UseProgram
(
const
OUString
&
rVertexShader
,
const
OUString
&
rFragmentShader
,
const
OString
&
preamble
)
...
...
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