|
|
@ -227,6 +227,8 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
int frameExecutors = a.getInteger(R.styleable.CameraView_cameraFrameProcessingExecutors, |
|
|
|
int frameExecutors = a.getInteger(R.styleable.CameraView_cameraFrameProcessingExecutors, |
|
|
|
DEFAULT_FRAME_PROCESSING_EXECUTORS); |
|
|
|
DEFAULT_FRAME_PROCESSING_EXECUTORS); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean drawHardwareOverlays = a.getBoolean(R.styleable.CameraView_cameraDrawHardwareOverlays, false); |
|
|
|
|
|
|
|
|
|
|
|
// Size selectors and gestures
|
|
|
|
// Size selectors and gestures
|
|
|
|
SizeSelectorParser sizeSelectors = new SizeSelectorParser(a); |
|
|
|
SizeSelectorParser sizeSelectors = new SizeSelectorParser(a); |
|
|
|
GestureParser gestures = new GestureParser(a); |
|
|
|
GestureParser gestures = new GestureParser(a); |
|
|
@ -260,6 +262,7 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
setUseDeviceOrientation(useDeviceOrientation); |
|
|
|
setUseDeviceOrientation(useDeviceOrientation); |
|
|
|
setGrid(controls.getGrid()); |
|
|
|
setGrid(controls.getGrid()); |
|
|
|
setGridColor(gridColor); |
|
|
|
setGridColor(gridColor); |
|
|
|
|
|
|
|
setDrawHardwareOverlays(drawHardwareOverlays); |
|
|
|
|
|
|
|
|
|
|
|
// Apply camera engine params
|
|
|
|
// Apply camera engine params
|
|
|
|
// Adding new ones? See setEngine().
|
|
|
|
// Adding new ones? See setEngine().
|
|
|
@ -2156,6 +2159,25 @@ public class CameraView extends FrameLayout implements LifecycleObserver { |
|
|
|
return mCameraEngine.isTakingPicture(); |
|
|
|
return mCameraEngine.isTakingPicture(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Sets the overlay layout hardware canvas capture mode to allow hardware |
|
|
|
|
|
|
|
* accelerated views to be captured in snapshots |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param on true if enabled |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void setDrawHardwareOverlays(boolean on) { |
|
|
|
|
|
|
|
mOverlayLayout.setHardwareCanvasEnabled(on); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Returns true if the overlay layout is set to capture the hardware canvas |
|
|
|
|
|
|
|
* of child views |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return boolean indicating hardware canvas capture is enabled |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public boolean getDrawHardwareOverlays() { |
|
|
|
|
|
|
|
return mOverlayLayout.getHardwareCanvasEnabled(); |
|
|
|
|
|
|
|
} |
|
|
|
//endregion
|
|
|
|
//endregion
|
|
|
|
|
|
|
|
|
|
|
|
//region Callbacks and dispatching
|
|
|
|
//region Callbacks and dispatching
|
|
|
|