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
3f0d16c5
Commit
3f0d16c5
authored
Nov 02, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do not use "lockedRect" unless the surface is locked in flush_to_framebuffer_drawpixels().
parent
b66478df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
surface.c
dlls/wined3d/surface.c
+14
-14
No files found.
dlls/wined3d/surface.c
View file @
3f0d16c5
...
@@ -1741,6 +1741,17 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This,
...
@@ -1741,6 +1741,17 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This,
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
device
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
device
;
const
struct
wined3d_gl_info
*
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
struct
wined3d_context
*
context
;
RECT
rect
;
UINT
w
,
h
;
if
(
This
->
Flags
&
SFLAG_LOCKED
)
rect
=
This
->
lockedRect
;
else
SetRect
(
&
rect
,
0
,
0
,
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
);
mem
+=
rect
.
top
*
pitch
+
rect
.
left
*
bpp
;
w
=
rect
.
right
-
rect
.
left
;
h
=
rect
.
bottom
-
rect
.
top
;
/* Activate the correct context for the render target */
/* Activate the correct context for the render target */
context
=
context_acquire
(
device
,
This
);
context
=
context_acquire
(
device
,
This
);
...
@@ -1762,7 +1773,7 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This,
...
@@ -1762,7 +1773,7 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This,
context_set_draw_buffer
(
context
,
device
->
offscreenBuffer
);
context_set_draw_buffer
(
context
,
device
->
offscreenBuffer
);
}
}
glRasterPos3i
(
This
->
lockedRect
.
left
,
This
->
lockedR
ect
.
top
,
1
);
glRasterPos3i
(
rect
.
left
,
r
ect
.
top
,
1
);
checkGLcall
(
"glRasterPos3i"
);
checkGLcall
(
"glRasterPos3i"
);
/* Some drivers(radeon dri, others?) don't like exceptions during
/* Some drivers(radeon dri, others?) don't like exceptions during
...
@@ -1789,19 +1800,8 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This,
...
@@ -1789,19 +1800,8 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This,
checkGLcall
(
"glBindBufferARB"
);
checkGLcall
(
"glBindBufferARB"
);
}
}
/* When the surface is locked we only have to refresh the locked part else we need to update the whole image */
glDrawPixels
(
w
,
h
,
fmt
,
type
,
mem
);
if
(
This
->
Flags
&
SFLAG_LOCKED
)
{
checkGLcall
(
"glDrawPixels"
);
glDrawPixels
(
This
->
lockedRect
.
right
-
This
->
lockedRect
.
left
,
(
This
->
lockedRect
.
bottom
-
This
->
lockedRect
.
top
)
-
1
,
fmt
,
type
,
mem
+
bpp
*
This
->
lockedRect
.
left
+
pitch
*
This
->
lockedRect
.
top
);
checkGLcall
(
"glDrawPixels"
);
}
else
{
glDrawPixels
(
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
,
fmt
,
type
,
mem
);
checkGLcall
(
"glDrawPixels"
);
}
if
(
This
->
Flags
&
SFLAG_PBO
)
{
if
(
This
->
Flags
&
SFLAG_PBO
)
{
GL_EXTCALL
(
glBindBufferARB
(
GL_PIXEL_UNPACK_BUFFER_ARB
,
0
));
GL_EXTCALL
(
glBindBufferARB
(
GL_PIXEL_UNPACK_BUFFER_ARB
,
0
));
...
...
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