Even though Houston’s mayoral race is officially “non-partisan”, there hasn’t been anyone elected mayor who identified as a Republican in a long time. Houston is like most big cities - Democrats live in city limits, Republicans live in the suburbs. The Houston mayoral election is no indicator of Texas politics as a whole.
As for Perry, he is considered by a great many Republicans in Texas as a self-serving flake. His support amongst Republicans does not run deep.
These two things do not indicate that Texas is becoming a swing state. It is still overwhelmingly Republican and likely will be for some time.