Commit 04f41257 by Nicolas Capens

Don't needlessly generate cursor drawing code.

Direct3D 9 provides support for a "hardware" cursor. There is no such thing in newer APIs, so we shouldn't waste time dynamically generating code for it. Change-Id: I8d54c3500966ce075afb83c98c5013024062eed8 Reviewed-on: https://swiftshader-review.googlesource.com/9629Reviewed-by: 's avatarCorentin Wallez <cwallez@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent 0f206537
...@@ -33,7 +33,7 @@ namespace sw ...@@ -33,7 +33,7 @@ namespace sw
{ {
extern bool forceWindowed; extern bool forceWindowed;
FrameBuffer::Cursor FrameBuffer::cursor = {0}; FrameBuffer::Cursor FrameBuffer::cursor = {};
bool FrameBuffer::topLeftOrigin = false; bool FrameBuffer::topLeftOrigin = false;
void FrameBuffer::typeinfo() {} void FrameBuffer::typeinfo() {}
...@@ -531,6 +531,8 @@ namespace sw ...@@ -531,6 +531,8 @@ namespace sw
} }
} }
if(state.cursorWidth > 0 && state.cursorHeight > 0)
{
Int x0 = *Pointer<Int>(cursor + OFFSET(Cursor,x)); Int x0 = *Pointer<Int>(cursor + OFFSET(Cursor,x));
Int y0 = *Pointer<Int>(cursor + OFFSET(Cursor,y)); Int y0 = *Pointer<Int>(cursor + OFFSET(Cursor,y));
...@@ -560,6 +562,7 @@ namespace sw ...@@ -560,6 +562,7 @@ namespace sw
} }
} }
} }
}
return function(L"FrameBuffer"); return function(L"FrameBuffer");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment