Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
6e4b1219
Commit
6e4b1219
authored
Nov 09, 2011
by
daniel@transgaming.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminated GetDesc calls.
TRAC #18714 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id:
https://angleproject.googlecode.com/svn/trunk@830
736b8ea6-26fd-11df-bfd4-992fa37f6226
parent
73de05a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
Texture.cpp
src/libGLESv2/Texture.cpp
+5
-11
Texture.h
src/libGLESv2/Texture.h
+1
-1
No files found.
src/libGLESv2/Texture.cpp
View file @
6e4b1219
...
...
@@ -342,7 +342,7 @@ GLenum Texture::getWrapT() const
// Store the pixel rectangle designated by xoffset,yoffset,width,height with pixels stored as format/type at input
// into the target pixel rectangle at output with outputPitch bytes in between each line.
void
Texture
::
loadImageData
(
GLint
xoffset
,
GLint
yoffset
,
GLsizei
width
,
GLsizei
height
,
GLenum
format
,
GLenum
type
,
GLint
unpackAlignment
,
const
void
*
input
,
size_t
outputPitch
,
void
*
output
,
D3D
SURFACE_DESC
*
description
)
const
GLint
unpackAlignment
,
const
void
*
input
,
size_t
outputPitch
,
void
*
output
,
D3D
FORMAT
targetFormat
)
const
{
GLsizei
inputPitch
=
-
ComputePitch
(
width
,
format
,
type
,
unpackAlignment
);
input
=
((
char
*
)
input
)
-
inputPitch
*
(
height
-
1
);
...
...
@@ -356,10 +356,10 @@ void Texture::loadImageData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei
loadAlphaImageData
(
xoffset
,
yoffset
,
width
,
height
,
inputPitch
,
input
,
outputPitch
,
output
);
break
;
case
GL_LUMINANCE
:
loadLuminanceImageData
(
xoffset
,
yoffset
,
width
,
height
,
inputPitch
,
input
,
outputPitch
,
output
,
description
->
Format
==
D3DFMT_L8
);
loadLuminanceImageData
(
xoffset
,
yoffset
,
width
,
height
,
inputPitch
,
input
,
outputPitch
,
output
,
target
Format
==
D3DFMT_L8
);
break
;
case
GL_LUMINANCE_ALPHA
:
loadLuminanceAlphaImageData
(
xoffset
,
yoffset
,
width
,
height
,
inputPitch
,
input
,
outputPitch
,
output
,
description
->
Format
==
D3DFMT_A8L8
);
loadLuminanceAlphaImageData
(
xoffset
,
yoffset
,
width
,
height
,
inputPitch
,
input
,
outputPitch
,
output
,
target
Format
==
D3DFMT_A8L8
);
break
;
case
GL_RGB
:
loadRGBUByteImageData
(
xoffset
,
yoffset
,
width
,
height
,
inputPitch
,
input
,
outputPitch
,
output
);
...
...
@@ -1161,10 +1161,7 @@ void Texture::setImage(GLint unpackAlignment, const void *pixels, Image *image)
if
(
SUCCEEDED
(
result
))
{
D3DSURFACE_DESC
description
;
image
->
getSurface
()
->
GetDesc
(
&
description
);
loadImageData
(
0
,
0
,
image
->
getWidth
(),
image
->
getHeight
(),
image
->
getFormat
(),
image
->
getType
(),
unpackAlignment
,
pixels
,
locked
.
Pitch
,
locked
.
pBits
,
&
description
);
loadImageData
(
0
,
0
,
image
->
getWidth
(),
image
->
getHeight
(),
image
->
getFormat
(),
image
->
getType
(),
unpackAlignment
,
pixels
,
locked
.
Pitch
,
locked
.
pBits
,
image
->
getD3DFormat
());
image
->
unlock
();
}
...
...
@@ -1220,10 +1217,7 @@ bool Texture::subImage(GLint xoffset, GLint yoffset, GLsizei width, GLsizei heig
if
(
SUCCEEDED
(
result
))
{
D3DSURFACE_DESC
description
;
image
->
getSurface
()
->
GetDesc
(
&
description
);
loadImageData
(
xoffset
,
transformPixelYOffset
(
yoffset
,
height
,
image
->
getHeight
()),
width
,
height
,
format
,
type
,
unpackAlignment
,
pixels
,
locked
.
Pitch
,
locked
.
pBits
,
&
description
);
loadImageData
(
xoffset
,
transformPixelYOffset
(
yoffset
,
height
,
image
->
getHeight
()),
width
,
height
,
format
,
type
,
unpackAlignment
,
pixels
,
locked
.
Pitch
,
locked
.
pBits
,
image
->
getD3DFormat
());
image
->
unlock
();
}
...
...
src/libGLESv2/Texture.h
View file @
6e4b1219
...
...
@@ -158,7 +158,7 @@ class Texture : public RefCountObject
DISALLOW_COPY_AND_ASSIGN
(
Texture
);
void
loadImageData
(
GLint
xoffset
,
GLint
yoffset
,
GLsizei
width
,
GLsizei
height
,
GLenum
format
,
GLenum
type
,
GLint
unpackAlignment
,
const
void
*
input
,
std
::
size_t
outputPitch
,
void
*
output
,
D3D
SURFACE_DESC
*
description
)
const
;
GLint
unpackAlignment
,
const
void
*
input
,
std
::
size_t
outputPitch
,
void
*
output
,
D3D
FORMAT
targetFormat
)
const
;
void
loadAlphaImageData
(
GLint
xoffset
,
GLint
yoffset
,
GLsizei
width
,
GLsizei
height
,
int
inputPitch
,
const
void
*
input
,
size_t
outputPitch
,
void
*
output
)
const
;
...
...
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