A method for image processing based on vertical synchronization signals, wherein the method is applied to an electronic device comprising a display screen, and the method comprises: if a first frame processing duration in a first measurement period is shorter than or equal to a preset single-frame duration, drawing (S401), by the electronic device, the one or more first layers in response to the first vertical synchronization signal, and rendering the one or more first layers, and after rendering the one or more first layers, performing layer composing on the rendered one or more first layers to obtain the first image frame; and if the first frame processing duration is longer than the preset single-frame duration, drawing, by the electronic device, the one or more first layers in response to the first vertical synchronization signal, and performing layer composing on the rendered one or more first layers in response to a third vertical synchronization signal, wherein the third vertical synchronization signal is subsequent to a second vertical synchronization signal that is subsequent to the first vertical synchronization signal, to obtain the first image frame; and refreshing and displaying (S402), by the electronic device, the first image frame in response to a second vertical synchronization signal; wherein the first frame processing duration is a sum of a first frame rendering duration and an SF frame duration for composing the first layer, the first frame rendering duration is a duration required for drawing the layer and rendering the drawn layer, the first SF frame duration is a duration required for performing layer composing on the rendered layer, and the preset single-frame duration is shorter than or equal to a signal period of the second vertical synchronization signal; and the method further comprises: performing, by the electronic device, positive scheduling on a hardware resource of the electronic device, to shorten a duration required by the electronic device for layer drawing, layer rendering, and/or layer composing. if a first frame processing duration in a first measurement period is shorter than or equal to a preset single-frame duration, drawing (S401), by the electronic device, the one or more first layers in response to the first vertical synchronization signal, and rendering the one or more first layers, and after rendering the one or more first layers, performing layer composing on the rendered one or more first layers to obtain the first image frame; and if the first frame processing duration is longer than the preset single-frame duration, drawing, by the electronic device, the one or more first layers in response to the first vertical synchronization signal, and performing layer composing on the rendered one or more first layers in response to a third vertical synchronization signal, wherein the third vertical synchronization signal is subsequent to a second vertical synchronization signal that is subsequent to the first vertical synchronization signal, to obtain the first image frame; and refreshing and displaying (S402), by the electronic device, the first image frame in response to a second vertical synchronization signal; wherein the first frame processing duration is a sum of a first frame rendering duration and an SF frame duration for composing the first layer, the first frame rendering duration is a duration required for drawing the layer and rendering the drawn layer, the first SF frame duration is a duration required for performing layer composing on the rendered layer, and the preset single-frame duration is shorter than or equal to a signal period of the second vertical synchronization signal; and the method further comprises: performing, by the electronic device, positive scheduling on a hardware resource of the electronic device, to shorten a duration required by the electronic device for layer drawing, layer rendering, and/or layer composing. <EOS>