Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
07795754
Commit
07795754
authored
Feb 28, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Jun 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Implement IWICBitmapScaler::Initialize.
parent
02aa7ec4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
scaler.c
dlls/windowscodecs/scaler.c
+36
-2
No files found.
dlls/windowscodecs/scaler.c
View file @
07795754
...
...
@@ -36,6 +36,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
typedef
struct
BitmapScaler
{
IWICBitmapScaler
IWICBitmapScaler_iface
;
LONG
ref
;
IWICBitmapSource
*
source
;
UINT
width
,
height
;
WICBitmapInterpolationMode
mode
;
CRITICAL_SECTION
lock
;
/* must be held when initialized */
}
BitmapScaler
;
static
inline
BitmapScaler
*
impl_from_IWICBitmapScaler
(
IWICBitmapScaler
*
iface
)
...
...
@@ -86,6 +90,9 @@ static ULONG WINAPI BitmapScaler_Release(IWICBitmapScaler *iface)
if
(
ref
==
0
)
{
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
lock
);
if
(
This
->
source
)
IWICBitmapSource_Release
(
This
->
source
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -136,9 +143,30 @@ static HRESULT WINAPI BitmapScaler_Initialize(IWICBitmapScaler *iface,
IWICBitmapSource
*
pISource
,
UINT
uiWidth
,
UINT
uiHeight
,
WICBitmapInterpolationMode
mode
)
{
FIXME
(
"(%p,%p,%u,%u,%u): stub
\n
"
,
iface
,
pISource
,
uiWidth
,
uiHeight
,
mode
);
BitmapScaler
*
This
=
impl_from_IWICBitmapScaler
(
iface
);
HRESULT
hr
=
S_OK
;
return
E_NOTIMPL
;
TRACE
(
"(%p,%p,%u,%u,%u)
\n
"
,
iface
,
pISource
,
uiWidth
,
uiHeight
,
mode
);
EnterCriticalSection
(
&
This
->
lock
);
if
(
This
->
source
)
{
hr
=
WINCODEC_ERR_WRONGSTATE
;
goto
end
;
}
IWICBitmapSource_AddRef
(
pISource
);
This
->
source
=
pISource
;
This
->
width
=
uiWidth
;
This
->
height
=
uiHeight
;
This
->
mode
=
mode
;
end:
LeaveCriticalSection
(
&
This
->
lock
);
return
hr
;
}
static
const
IWICBitmapScalerVtbl
BitmapScaler_Vtbl
=
{
...
...
@@ -162,6 +190,12 @@ HRESULT BitmapScaler_Create(IWICBitmapScaler **scaler)
This
->
IWICBitmapScaler_iface
.
lpVtbl
=
&
BitmapScaler_Vtbl
;
This
->
ref
=
1
;
This
->
source
=
NULL
;
This
->
width
=
0
;
This
->
height
=
0
;
This
->
mode
=
0
;
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": BitmapScaler.lock"
);
*
scaler
=
&
This
->
IWICBitmapScaler_iface
;
...
...
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