projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
916c8ed
)
glx: Optimize out no-op make current calls
author
Kristian Høgsberg
<krh@bitplanet.net>
Thu, 9 Sep 2010 17:18:40 +0000
(13:18 -0400)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Thu, 9 Sep 2010 17:18:43 +0000
(13:18 -0400)
This make a lot more sense now that we might have to recreate the
glx drawables for legacy code paths.
src/glx/glxcurrent.c
patch
|
blob
|
history
diff --git
a/src/glx/glxcurrent.c
b/src/glx/glxcurrent.c
index 0d359f72b4adb6aca0519abe7ccd49bb53d77b44..36317383544240ce1cbad2a423473dd126d30cd4 100644
(file)
--- a/
src/glx/glxcurrent.c
+++ b/
src/glx/glxcurrent.c
@@
-242,6
+242,10
@@
MakeContextCurrent(Display * dpy, GLXDrawable draw,
return False;
}
+ if (oldGC == gc &&
+ gc->currentDrawable == draw && gc->currentReadable == read)
+ return True;
+
if (oldGC != &dummyContext) {
oldGC->vtable->unbind(oldGC, gc);
oldGC->currentDpy = 0;