The PiCamera documentation (https://picamera.readthedocs.io/en/release-1.13/fov.html#sensor-modes) states that an embedded GPU is used for all sorts of digital processing, including digital gain, white balancing, demosaicing, etc. (See section 6.1.6. Background Processes).
Meanwhile, the documentation of Sony IMX219 (https://github.com/rellimmot/Sony-IMX219-Raspberry-Pi-V2-CMOS/blob/master/RASPBERRY%20PI%20CAMERA%20V2%20DATASHEET%20IMX219PQH5_7.0.0_Datasheet_XXX.PDF), the sensor used in PiCamera, states that there is digital processing within the sensor itself (see section, "On Chip Image Processing". The sensor documentation also says that the sensor has a power consumption for digital processes. However, it is worth noting that there are only a few steps of processing happening here - namely, test pattern generation and black level adjustment, digital gain setting, defect correction, and pixel realignment - and, therefore, the on-chip processing is incomplete. Meanwhile, the entire digital processing pipeline, which has 12 steps of processing, tinkers with the images when they arrive at the GPU. These steps repeat the aforementioned "on-chip image processing" steps.
This is weird because the PiCamera documentation explicitly states that the data coming to GPU is RAW Bayer data, which is totally unprocessed and processed at the GPU (which has the ISP). So, has the PiCamera only based itself upon Sony IMX219? Is it so that only the analog core of Sony IMX219 has passed on to the PiCamera, and other ends have been transferred out of it?