Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
8c18c69a
Commit
8c18c69a
authored
Jan 05, 2011
by
Erwan Tulou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: cache scaled image
parent
51544425
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
modules/gui/skins2/controls/ctrl_tree.cpp
modules/gui/skins2/controls/ctrl_tree.cpp
+12
-3
modules/gui/skins2/controls/ctrl_tree.hpp
modules/gui/skins2/controls/ctrl_tree.hpp
+2
-0
No files found.
modules/gui/skins2/controls/ctrl_tree.cpp
View file @
8c18c69a
...
...
@@ -61,7 +61,8 @@ CtrlTree::CtrlTree( intf_thread_t *pIntf,
m_pOpenBitmap
(
pOpenBitmap
),
m_pClosedBitmap
(
pClosedBitmap
),
m_fgColor
(
fgColor
),
m_playColor
(
playColor
),
m_bgColor1
(
bgColor1
),
m_bgColor2
(
bgColor2
),
m_selColor
(
selColor
),
m_pLastSelected
(
NULL
),
m_pImage
(
NULL
),
m_dontMove
(
false
)
m_pLastSelected
(
NULL
),
m_pImage
(
NULL
),
m_dontMove
(
false
),
m_pScaledBitmap
(
NULL
)
{
// Observe the tree and position variables
m_rTree
.
addObserver
(
this
);
...
...
@@ -78,6 +79,7 @@ CtrlTree::~CtrlTree()
{
m_rTree
.
getPositionVar
().
delObserver
(
this
);
m_rTree
.
delObserver
(
this
);
delete
m_pScaledBitmap
;
delete
m_pImage
;
}
...
...
@@ -791,8 +793,15 @@ void CtrlTree::makeImage()
if
(
m_pBgBitmap
)
{
// Draw the background bitmap
ScaledBitmap
bmp
(
getIntf
(),
*
m_pBgBitmap
,
width
,
height
);
m_pImage
->
drawBitmap
(
bmp
,
0
,
0
);
if
(
!
m_pScaledBitmap
||
m_pScaledBitmap
->
getWidth
()
!=
width
||
m_pScaledBitmap
->
getHeight
()
!=
height
)
{
delete
m_pScaledBitmap
;
m_pScaledBitmap
=
new
ScaledBitmap
(
getIntf
(),
*
m_pBgBitmap
,
width
,
height
);
}
m_pImage
->
drawBitmap
(
*
m_pScaledBitmap
,
0
,
0
);
for
(
int
yPos
=
0
;
yPos
<
height
;
yPos
+=
i_itemHeight
)
{
...
...
modules/gui/skins2/controls/ctrl_tree.hpp
View file @
8c18c69a
...
...
@@ -98,6 +98,8 @@ private:
const
GenericBitmap
*
m_pOpenBitmap
;
/// Closed node bitmap
const
GenericBitmap
*
m_pClosedBitmap
;
/// scaled bitmap
GenericBitmap
*
m_pScaledBitmap
;
/// Color of normal test
uint32_t
m_fgColor
;
/// Color of the playing item
...
...
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