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
f3cad17a
Commit
f3cad17a
authored
Nov 21, 2008
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement CachedBitmap based on Image.
parent
ef0069cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
19 deletions
+5
-19
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-1
image.c
dlls/gdiplus/image.c
+4
-18
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
f3cad17a
...
...
@@ -197,7 +197,7 @@ struct GpBitmap{
};
struct
GpCachedBitmap
{
Gp
Bitmap
*
bmp
;
Gp
Image
*
image
;
};
struct
GpImageAttributes
{
...
...
dlls/gdiplus/image.c
View file @
f3cad17a
...
...
@@ -552,7 +552,6 @@ GpStatus WINGDIPAPI GdipCreateCachedBitmap(GpBitmap *bitmap, GpGraphics *graphic
GpCachedBitmap
**
cachedbmp
)
{
GpStatus
stat
;
GpImage
*
copy
;
TRACE
(
"%p %p %p
\n
"
,
bitmap
,
graphics
,
cachedbmp
);
...
...
@@ -562,26 +561,13 @@ GpStatus WINGDIPAPI GdipCreateCachedBitmap(GpBitmap *bitmap, GpGraphics *graphic
*
cachedbmp
=
GdipAlloc
(
sizeof
(
GpCachedBitmap
));
if
(
!*
cachedbmp
)
return
OutOfMemory
;
(
*
cachedbmp
)
->
bmp
=
GdipAlloc
(
sizeof
(
GpBitmap
));
if
(
!
(
*
cachedbmp
)
->
bmp
){
GdipFree
(
*
cachedbmp
);
return
OutOfMemory
;
}
copy
=
&
(
*
cachedbmp
)
->
bmp
->
image
;
stat
=
GdipCloneImage
(
&
(
bitmap
->
image
),
&
copy
);
stat
=
GdipCloneImage
(
&
(
bitmap
->
image
),
&
(
*
cachedbmp
)
->
image
);
if
(
stat
!=
Ok
){
GdipFree
(
*
cachedbmp
);
return
stat
;
}
(
*
cachedbmp
)
->
bmp
->
width
=
bitmap
->
width
;
(
*
cachedbmp
)
->
bmp
->
height
=
bitmap
->
height
;
(
*
cachedbmp
)
->
bmp
->
format
=
bitmap
->
format
;
(
*
cachedbmp
)
->
bmp
->
lockmode
=
0
;
(
*
cachedbmp
)
->
bmp
->
numlocks
=
0
;
(
*
cachedbmp
)
->
bmp
->
bitmapbits
=
NULL
;
return
Ok
;
}
...
...
@@ -592,8 +578,8 @@ GpStatus WINGDIPAPI GdipDeleteCachedBitmap(GpCachedBitmap *cachedbmp)
if
(
!
cachedbmp
)
return
InvalidParameter
;
GdipDisposeImage
(
&
cachedbmp
->
bmp
->
image
);
GdipFree
(
cachedbmp
->
bmp
);
GdipDisposeImage
(
cached
bmp
->
image
);
GdipFree
(
cachedbmp
);
return
Ok
;
}
...
...
@@ -606,7 +592,7 @@ GpStatus WINGDIPAPI GdipDrawCachedBitmap(GpGraphics *graphics,
if
(
!
graphics
||
!
cachedbmp
)
return
InvalidParameter
;
return
GdipDrawImage
(
graphics
,
&
cachedbmp
->
bmp
->
image
,
(
REAL
)
x
,
(
REAL
)
y
);
return
GdipDrawImage
(
graphics
,
cached
bmp
->
image
,
(
REAL
)
x
,
(
REAL
)
y
);
}
GpStatus
WINGDIPAPI
GdipDisposeImage
(
GpImage
*
image
)
...
...
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