Avoid some unnecessary D3D state changes.

* Add check to make sure we're not setting the same constant buffer
* Add check to make sure we're not setting the same pipeline state
* Cache descriptor tables to avoid unnecessary descriptor copies
  and GPU descriptor table heap entries.

Change-Id: Ia68dacb347736287c24862c74fd3e231288f5c94
Bug: skia:10508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303663
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
9 files changed