class_docstr: Texture mixin class for smarter scaling decisions.
  
  This class wraps the logic to normalize data on the CPU before sending
  it to the GPU (the texture). Pre-scaling on the CPU can be helpful in
  cases where OpenGL 2/ES requirements limit the texture storage to an
  8-bit normalized integer internally.
  
  This class includes optimizations where image data is not re-normalized
  if the previous normalization can still be used to visualize the data
  with the new color limits.
  
  This class should only be used internally. For similar features where
  scaling occurs on the GPU see
  :class:`vispy.visuals._scalable_textures.GPUScaledTextureMixin`.
  
  To use this mixin, a subclass should be created to combine this mixin with
  the texture class being used. Existing subclasses already exist in this
  module. Note that this class **must** appear first in the subclass's parent
  classes so that its ``__init__`` method is called instead of the parent
  Texture class.
class_docstr_tok: ["Texture","mixin","class","for","smarter","scaling","decisions",".","This","class","wraps","the","logic","to","normalize","data","on","the","CPU","before","sending","it","to","the","GPU","(","the","texture",")",".","Pre-scaling","on","the","CPU","can","be","helpful","in","cases","where","OpenGL","2\/ES","requirements","limit","the","texture","storage","to","an","8-bit","normalized","integer","internally",".","This","class","includes","optimizations","where","image","data","is","not","re-normalized","if","the","previous","normalization","can","still","be","used","to","visualize","the","data","with","the","new","color","limits",".","This","class","should","only","be","used","internally",".","For","similar","features","where","scaling","occurs","on","the","GPU","see",":","class",":","`","vispy.visuals._scalable_textures.GPUScaledTextureMixin","`",".","To","use","this","mixin",",","a","subclass","should","be","created","to","combine","this","mixin","with","the","texture","class","being","used",".","Existing","subclasses","already","exist","in","this","module",".","Note","that","this","class","*","*","must","*","*","appear","first","in","the","subclass","'s","parent","classes","so","that","its","``","__init__","``","method","is","called","instead","of","the","parent","Texture","class","."]
code: def __init__(self, data=None, **texture_kwargs):
      self._data_limits = None
      # Call the __init__ of the mixin base class
      super().__init__(data, **texture_kwargs)
  
imports: import warnings
  import numpy
  from vispy.gloo.texture import Texture2D, Texture3D, convert_dtype_and_clip
label_desc: Use image node_id 1 to create a new CPUScaledTextureMixin object from inherited base classes: _ScaledTextureMixin with example: obj = CPUScaledTextureMixin(data)