docs: private void configureTransform(int viewWidth, int viewHeight) {
  		int cameraWidth,cameraHeight;
  		try {
  			open.mLock.lock();
  			if (null == mTextureView || null == open.mCameraSize) {
  				return;
  			}
  			cameraWidth = open.mCameraSize.getWidth();
  			cameraHeight = open.mCameraSize.getHeight();
  		} finally {
  			open.mLock.unlock();
  		}
  
  		int rotation = getWindowManager().getDefaultDisplay().getRotation();
  		Matrix matrix = new Matrix();
  		RectF viewRect = new RectF(0, 0, viewWidth, viewHeight);
  		RectF bufferRect = new RectF(0, 0, cameraHeight, cameraWidth);// TODO why w/h swapped?
  		float centerX = viewRect.centerX();
  		float centerY = viewRect.centerY();
  		if (Surface.ROTATION_90 == rotation || Surface.ROTATION_270 == rotation) {
  			bufferRect.offset(centerX - bufferRect.centerX(), centerY - bufferRect.centerY());
  			matrix.setRectToRect(viewRect, bufferRect, Matrix.ScaleToFit.FILL);
  			float scale = Math.max(
  					(float) viewHeight / cameraHeight,
  					(float) viewWidth / cameraWidth);
  			matrix.postScale(scale, scale, centerX, centerY);
  			matrix.postRotate(90 * (rotation - 2), centerX, centerY);
  		}
  		mTextureView.setTransform(matrix);
  	}