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
878cea91
Kaydet (Commit)
878cea91
authored
Kas 18, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
windows opengl: Provide the context to textures everywhere where we have it.
Change-Id: Ib820326fdc752d0893840bad3eb7f1369469f796
üst
fef950f8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
57 deletions
+24
-57
contextprovider.hxx
vcl/inc/opengl/contextprovider.hxx
+0
-28
salbmp.hxx
vcl/inc/opengl/salbmp.hxx
+1
-1
salgdi.hxx
vcl/inc/salgdi.hxx
+4
-0
salgdi.h
vcl/inc/unx/salgdi.h
+1
-1
salbmp.cxx
vcl/opengl/salbmp.cxx
+6
-17
salgdilayout.cxx
vcl/source/gdi/salgdilayout.cxx
+12
-1
salgdi.cxx
vcl/unx/generic/gdi/salgdi.cxx
+0
-9
No files found.
vcl/inc/opengl/contextprovider.hxx
deleted
100644 → 0
Dosyayı görüntüle @
fef950f8
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_VCL_INC_OPENGL_CONTEXTPROVIDER_HXX
#define INCLUDED_VCL_INC_OPENGL_CONTEXTPROVIDER_HXX
#include "vclpluginapi.h"
#include <vcl/opengl/OpenGLContext.hxx>
class
VCLPLUG_GEN_PUBLIC
OpenGLContextProvider
{
public
:
virtual
~
OpenGLContextProvider
()
{};
/* Get the OpenGL context provided by this instance */
virtual
OpenGLContext
*
GetOpenGLContext
()
const
=
0
;
};
#endif // INCLUDED_VCL_INC_OPENGL_CONTEXTPROVIDER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/inc/opengl/salbmp.hxx
Dosyayı görüntüle @
878cea91
...
@@ -52,7 +52,7 @@ private:
...
@@ -52,7 +52,7 @@ private:
int
mnBufHeight
;
int
mnBufHeight
;
std
::
deque
<
OpenGLSalBitmapOp
*
>
maPendingOps
;
std
::
deque
<
OpenGLSalBitmapOp
*
>
maPendingOps
;
bool
makeCurrent
();
void
makeCurrent
();
public
:
public
:
OpenGLSalBitmap
();
OpenGLSalBitmap
();
...
...
vcl/inc/salgdi.hxx
Dosyayı görüntüle @
878cea91
...
@@ -44,6 +44,7 @@ class SalLayout;
...
@@ -44,6 +44,7 @@ class SalLayout;
class
ImplLayoutArgs
;
class
ImplLayoutArgs
;
class
Rectangle
;
class
Rectangle
;
class
FontSubsetInfo
;
class
FontSubsetInfo
;
class
OpenGLContext
;
class
OutputDevice
;
class
OutputDevice
;
class
ServerFontLayout
;
class
ServerFontLayout
;
struct
SystemGraphicsData
;
struct
SystemGraphicsData
;
...
@@ -85,6 +86,9 @@ public:
...
@@ -85,6 +86,9 @@ public:
virtual
SalGraphicsImpl
*
GetImpl
()
const
=
0
;
virtual
SalGraphicsImpl
*
GetImpl
()
const
=
0
;
/// Check that our mpImpl is OpenGL and return the context, otherwise NULL.
virtual
OpenGLContext
*
GetOpenGLContext
()
const
;
void
setAntiAliasB2DDraw
(
bool
bNew
)
{
m_bAntiAliasB2DDraw
=
bNew
;
}
void
setAntiAliasB2DDraw
(
bool
bNew
)
{
m_bAntiAliasB2DDraw
=
bNew
;
}
bool
getAntiAliasB2DDraw
()
const
{
return
m_bAntiAliasB2DDraw
;
}
bool
getAntiAliasB2DDraw
()
const
{
return
m_bAntiAliasB2DDraw
;
}
...
...
vcl/inc/unx/salgdi.h
Dosyayı görüntüle @
878cea91
...
@@ -62,7 +62,7 @@ namespace basegfx {
...
@@ -62,7 +62,7 @@ namespace basegfx {
class
B2DTrapezoid
;
class
B2DTrapezoid
;
}
}
class
VCLPLUG_GEN_PUBLIC
X11SalGraphics
:
public
SalGraphics
,
public
OpenGLContextProvider
class
VCLPLUG_GEN_PUBLIC
X11SalGraphics
:
public
SalGraphics
{
{
friend
class
ServerFontLayout
;
friend
class
ServerFontLayout
;
friend
class
X11SalGraphicsImpl
;
friend
class
X11SalGraphicsImpl
;
...
...
vcl/opengl/salbmp.cxx
Dosyayı görüntüle @
878cea91
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include "svdata.hxx"
#include "svdata.hxx"
#include "salgdi.hxx"
#include "salgdi.hxx"
#include "opengl/contextprovider.hxx"
#include "opengl/salbmp.hxx"
#include "opengl/salbmp.hxx"
static
bool
isValidBitCount
(
sal_uInt16
nBitCount
)
static
bool
isValidBitCount
(
sal_uInt16
nBitCount
)
...
@@ -407,8 +406,7 @@ GLuint OpenGLSalBitmap::CreateTexture()
...
@@ -407,8 +406,7 @@ GLuint OpenGLSalBitmap::CreateTexture()
}
}
}
}
if
(
!
makeCurrent
()
)
makeCurrent
();
return
0
;
maTexture
=
OpenGLTexture
(
mnBufWidth
,
mnBufHeight
,
nFormat
,
nType
,
pData
);
maTexture
=
OpenGLTexture
(
mnBufWidth
,
mnBufHeight
,
nFormat
,
nType
,
pData
);
SAL_INFO
(
"vcl.opengl"
,
"Created texture "
<<
maTexture
.
Id
()
);
SAL_INFO
(
"vcl.opengl"
,
"Created texture "
<<
maTexture
.
Id
()
);
...
@@ -470,21 +468,13 @@ sal_uInt16 OpenGLSalBitmap::GetBitCount() const
...
@@ -470,21 +468,13 @@ sal_uInt16 OpenGLSalBitmap::GetBitCount() const
return
mnBits
;
return
mnBits
;
}
}
bool
OpenGLSalBitmap
::
makeCurrent
()
void
OpenGLSalBitmap
::
makeCurrent
()
{
{
if
(
!
mpContext
||
!
mpContext
->
isInitialized
())
if
(
!
mpContext
||
!
mpContext
->
isInitialized
())
{
mpContext
=
ImplGetDefaultWindow
()
->
GetGraphics
()
->
GetOpenGLContext
();
OpenGLContextProvider
*
pProvider
;
pProvider
=
dynamic_cast
<
OpenGLContextProvider
*
>
(
ImplGetDefaultWindow
()
->
GetGraphics
()
);
assert
(
mpContext
&&
"Couldn't get default OpenGL context provider"
);
if
(
pProvider
==
NULL
)
{
SAL_WARN
(
"vcl.opengl"
,
"Couldn't get default OpenGL context provider"
);
return
false
;
}
mpContext
=
pProvider
->
GetOpenGLContext
();
}
mpContext
->
makeCurrent
();
mpContext
->
makeCurrent
();
return
true
;
}
}
BitmapBuffer
*
OpenGLSalBitmap
::
AcquireBuffer
(
bool
/*bReadOnly*/
)
BitmapBuffer
*
OpenGLSalBitmap
::
AcquireBuffer
(
bool
/*bReadOnly*/
)
...
@@ -499,8 +489,7 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( bool /*bReadOnly*/ )
...
@@ -499,8 +489,7 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( bool /*bReadOnly*/ )
if
(
!
maPendingOps
.
empty
()
)
if
(
!
maPendingOps
.
empty
()
)
{
{
if
(
!
makeCurrent
())
makeCurrent
();
return
NULL
;
SAL_INFO
(
"vcl.opengl"
,
"** Creating texture and reading it back immediatly"
);
SAL_INFO
(
"vcl.opengl"
,
"** Creating texture and reading it back immediatly"
);
if
(
!
CreateTexture
()
||
!
AllocateUserData
()
||
!
ReadTexture
()
)
if
(
!
CreateTexture
()
||
!
AllocateUserData
()
||
!
ReadTexture
()
)
...
...
vcl/source/gdi/salgdilayout.cxx
Dosyayı görüntüle @
878cea91
...
@@ -27,11 +27,13 @@
...
@@ -27,11 +27,13 @@
#include <vcl/metaact.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/print.hxx>
#include <vcl/print.hxx>
#include <vcl/opengl/OpenGLContext.hxx>
#include <vcl/outdev.hxx>
#include <vcl/outdev.hxx>
#include <vcl/unowrap.hxx>
#include <vcl/unowrap.hxx>
#include <vcl/settings.hxx>
#include <vcl/settings.hxx>
#include <window.h>
#include <window.h>
#include <openglgdiimpl.hxx>
#include <outdev.h>
#include <outdev.h>
#include <sallayout.hxx>
#include <sallayout.hxx>
#include <salgdi.hxx>
#include <salgdi.hxx>
...
@@ -43,7 +45,7 @@
...
@@ -43,7 +45,7 @@
#include <boost/scoped_array.hpp>
#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#include
"basegfx/polygon/b2dpolygon.hxx"
#include
<basegfx/polygon/b2dpolygon.hxx>
// The only common SalFrame method
// The only common SalFrame method
...
@@ -75,6 +77,15 @@ SalGraphics::~SalGraphics()
...
@@ -75,6 +77,15 @@ SalGraphics::~SalGraphics()
{
{
}
}
OpenGLContext
*
SalGraphics
::
GetOpenGLContext
()
const
{
OpenGLSalGraphicsImpl
*
pImpl
=
dynamic_cast
<
OpenGLSalGraphicsImpl
*>
(
GetImpl
());
if
(
pImpl
)
return
&
pImpl
->
GetOpenGLContext
();
return
NULL
;
}
bool
SalGraphics
::
drawTransformedBitmap
(
bool
SalGraphics
::
drawTransformedBitmap
(
const
basegfx
::
B2DPoint
&
/* rNull */
,
const
basegfx
::
B2DPoint
&
/* rNull */
,
const
basegfx
::
B2DPoint
&
/* rX */
,
const
basegfx
::
B2DPoint
&
/* rX */
,
...
...
vcl/unx/generic/gdi/salgdi.cxx
Dosyayı görüntüle @
878cea91
...
@@ -173,15 +173,6 @@ void X11SalGraphics::DeInit()
...
@@ -173,15 +173,6 @@ void X11SalGraphics::DeInit()
SetDrawable
(
None
,
m_nXScreen
);
SetDrawable
(
None
,
m_nXScreen
);
}
}
OpenGLContext
*
X11SalGraphics
::
GetOpenGLContext
()
const
{
OpenGLSalGraphicsImpl
*
pImpl
;
pImpl
=
dynamic_cast
<
OpenGLSalGraphicsImpl
*>
(
mpImpl
.
get
());
if
(
pImpl
)
return
&
pImpl
->
GetOpenGLContext
();
return
NULL
;
}
void
X11SalGraphics
::
SetClipRegion
(
GC
pGC
,
Region
pXReg
)
const
void
X11SalGraphics
::
SetClipRegion
(
GC
pGC
,
Region
pXReg
)
const
{
{
Display
*
pDisplay
=
GetXDisplay
();
Display
*
pDisplay
=
GetXDisplay
();
...
...
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