Small refactoring in SkImage_Codec
Small refactoring in SkImage_Codec

BUG=skia:2947
R=junov@chromium.org, reed@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/579773003

TeamTwisted/external_skia,OneRom/external_skia,geekboxzone/mmallow_external_skia,aosp-mirror/platform_external_skia,MarshedOut/android_external_skia,Igalia/skia,UBERMALLOW/external_skia,amyvmiwei/skia,Omegaphora/external_chromium_org_third_party_skia,BrokenROM/external_skia,nvoron23/skia,TeamEOS/external_chromium_org_third_party_skia,AOSPB/external_skia,pcwalton/skia,MonkeyZZZZ/platform_external_skia,nfxosp/platform_external_skia,Omegaphora/external_chromium_org_third_party_skia,MyAOSP/external_chromium_org_third_party_skia,timduru/platform-external-skia,OneRom/external_skia,FusionSP/external_chromium_org_third_party_skia,w3nd1go/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,OptiPop/external_chromium_org_third_party_skia,tmpvar/skia.cc,geekboxzone/mmallow_external_skia,DARKPOP/external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,MIPS/external-chromium_org-third_party-skia,DiamondLovesYou/skia-sys,HalCanary/skia-hc,MinimalOS-AOSP/platform_external_skia,MonkeyZZZZ/platform_external_skia,samuelig/skia,shahrzadmn/skia,timduru/platform-external-skia,ominux/skia,Igalia/skia,TeamEOS/external_chromium_org_third_party_skia,chenlian2015/skia_from_google,Hikari-no-Tenshi/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,Jichao/skia,BrokenROM/external_skia,ominux/skia,invisiblek/android_external_skia,jtg-gg/skia,ench0/external_chromium_org_third_party_skia,nfxosp/platform_external_skia,DARKPOP/external_chromium_org_third_party_skia,TeamTwisted/external_skia,nvoron23/skia,MinimalOS/external_chromium_org_third_party_skia,Fusion-Rom/external_chromium_org_third_party_skia,geekboxzone/mmallow_external_skia,TeamTwisted/external_skia,pcwalton/skia,YUPlayGodDev/platform_external_skia,MarshedOut/android_external_skia,spezi77/android_external_skia,pcwalton/skia,MonkeyZZZZ/platform_external_skia,noselhq/skia,samuelig/skia,MinimalOS-AOSP/platform_external_skia,HalCanary/skia-hc,TeamTwisted/external_skia,todotodoo/skia,google/skia,MinimalOS/android_external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,AOSPB/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,nfxosp/platform_external_skia,ench0/external_chromium_org_third_party_skia,google/skia,vanish87/skia,Jichao/skia,TeamEOS/external_chromium_org_third_party_skia,shahrzadmn/skia,Infinitive-OS/platform_external_skia,Infinitive-OS/platform_external_skia,vanish87/skia,MarshedOut/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,DiamondLovesYou/skia-sys,ench0/external_chromium_org_third_party_skia,Hikari-no-Tenshi/android_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,boulzordev/android_external_skia,vanish87/skia,shahrzadmn/skia,MonkeyZZZZ/platform_external_skia,amyvmiwei/skia,shahrzadmn/skia,samuelig/skia,scroggo/skia,DARKPOP/external_chromium_org_third_party_skia,tmpvar/skia.cc,google/skia,HalCanary/skia-hc,ominux/skia,AOSP-YU/platform_external_skia,qrealka/skia-hc,PAC-ROM/android_external_skia,Igalia/skia,OneRom/external_skia,Igalia/skia,amyvmiwei/skia,MinimalOS/android_external_chromium_org_third_party_skia,boulzordev/android_external_skia,Igalia/skia,YUPlayGodDev/platform_external_skia,qrealka/skia-hc,todotodoo/skia,timduru/platform-external-skia,TeamExodus/external_skia,Omegaphora/external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,MonkeyZZZZ/platform_external_skia,AOSP-YU/platform_external_skia,nvoron23/skia,scroggo/skia,FusionSP/external_chromium_org_third_party_skia,boulzordev/android_external_skia,TeamTwisted/external_skia,OneRom/external_skia,chenlian2015/skia_from_google,geekboxzone/mmallow_external_skia,ench0/external_chromium_org_third_party_skia,DiamondLovesYou/skia-sys,TeamExodus/external_skia,AOSPB/external_skia,ench0/external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,noselhq/skia,TeamTwisted/external_skia,MIPS/external-chromium_org-third_party-skia,AOSPB/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,invisiblek/android_external_skia,pcwalton/skia,OptiPop/external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,scroggo/skia,w3nd1go/android_external_skia,Igalia/skia,spezi77/android_external_skia,noselhq/skia,chenlian2015/skia_from_google,tmpvar/skia.cc,spezi77/android_external_skia,DiamondLovesYou/skia-sys,pcwalton/skia,TeamEOS/external_chromium_org_third_party_skia,geekboxzone/mmallow_external_skia,w3nd1go/android_external_skia,OptiPop/external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,DiamondLovesYou/skia-sys,chenlian2015/skia_from_google,TeamEOS/external_chromium_org_third_party_skia,UBERMALLOW/external_skia,rubenvb/skia,rubenvb/skia,MinimalOS/android_external_chromium_org_third_party_skia,samuelig/skia,rubenvb/skia,MIPS/external-chromium_org-third_party-skia,MyAOSP/external_chromium_org_third_party_skia,w3nd1go/android_external_skia,ominux/skia,FusionSP/external_chromium_org_third_party_skia,nvoron23/skia,FusionSP/external_chromium_org_third_party_skia,rubenvb/skia,pcwalton/skia,invisiblek/android_external_skia,ench0/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,YUPlayGodDev/platform_external_skia,Jichao/skia,invisiblek/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,scroggo/skia,geekboxzone/mmallow_external_skia,VRToxin-AOSP/android_external_skia,Jichao/skia,PAC-ROM/android_external_skia,TeamTwisted/external_skia,OneRom/external_skia,invisiblek/android_external_skia,amyvmiwei/skia,scroggo/skia,FusionSP/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,MarshedOut/android_external_skia,BrokenROM/external_skia,AOSPB/external_skia,OptiPop/external_chromium_org_third_party_skia,Jichao/skia,TeamEOS/external_chromium_org_third_party_skia,BrokenROM/external_skia,samuelig/skia,android-ia/platform_external_chromium_org_third_party_skia,google/skia,DARKPOP/external_chromium_org_third_party_skia,MinimalOS/android_external_chromium_org_third_party_skia,todotodoo/skia,shahrzadmn/skia,nfxosp/platform_external_skia,aosp-mirror/platform_external_skia,MinimalOS/external_chromium_org_third_party_skia,MinimalOS-AOSP/platform_external_skia,Hikari-no-Tenshi/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,amyvmiwei/skia,nfxosp/platform_external_skia,TeamExodus/external_skia,TeamExodus/external_skia,noselhq/skia,MyAOSP/external_chromium_org_third_party_skia,chenlian2015/skia_from_google,invisiblek/android_external_skia,spezi77/android_external_skia,BrokenROM/external_skia,YUPlayGodDev/platform_external_skia,google/skia,noselhq/skia,VRToxin-AOSP/android_external_skia,AOSP-YU/platform_external_skia,VRToxin-AOSP/android_external_skia,TeamExodus/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,timduru/platform-external-skia,nvoron23/skia,MarshedOut/android_external_skia,UBERMALLOW/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,YUPlayGodDev/platform_external_skia,shahrzadmn/skia,MinimalOS-AOSP/platform_external_skia,HalCanary/skia-hc,YUPlayGodDev/platform_external_skia,HalCanary/skia-hc,Omegaphora/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,scroggo/skia,mydongistiny/external_chromium_org_third_party_skia,MinimalOS/android_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,Jichao/skia,nfxosp/platform_external_skia,aosp-mirror/platform_external_skia,MinimalOS/external_chromium_org_third_party_skia,MinimalOS-AOSP/platform_external_skia,ominux/skia,w3nd1go/android_external_skia,HalCanary/skia-hc,amyvmiwei/skia,MIPS/external-chromium_org-third_party-skia,OneRom/external_skia,vanish87/skia,mydongistiny/external_chromium_org_third_party_skia,MinimalOS-AOSP/platform_external_skia,nfxosp/platform_external_skia,Omegaphora/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,chenlian2015/skia_from_google,nvoron23/skia,MonkeyZZZZ/platform_external_skia,nvoron23/skia,UBERMALLOW/external_skia,jtg-gg/skia,jtg-gg/skia,MarshedOut/android_external_skia,noselhq/skia,MinimalOS/android_external_chromium_org_third_party_skia,scroggo/skia,AOSP-YU/platform_external_skia,samuelig/skia,pcwalton/skia,qrealka/skia-hc,MyAOSP/external_chromium_org_third_party_skia,ominux/skia,MonkeyZZZZ/platform_external_skia,todotodoo/skia,OneRom/external_skia,PAC-ROM/android_external_skia,todotodoo/skia,qrealka/skia-hc,jtg-gg/skia,rubenvb/skia,MinimalOS-AOSP/platform_external_skia,amyvmiwei/skia,OptiPop/external_chromium_org_third_party_skia,samuelig/skia,w3nd1go/android_external_skia,google/skia,tmpvar/skia.cc,tmpvar/skia.cc,BrokenROM/external_skia,aosp-mirror/platform_external_skia,MIPS/external-chromium_org-third_party-skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,jtg-gg/skia,vanish87/skia,Hikari-no-Tenshi/android_external_skia,AOSP-YU/platform_external_skia,Jichao/skia,qrealka/skia-hc,nfxosp/platform_external_skia,MyAOSP/external_chromium_org_third_party_skia,UBERMALLOW/external_skia,UBERMALLOW/external_skia,ominux/skia,w3nd1go/android_external_skia,vanish87/skia,Infinitive-OS/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,vanish87/skia,MinimalOS-AOSP/platform_external_skia,VRToxin-AOSP/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,timduru/platform-external-skia,YUPlayGodDev/platform_external_skia,Infinitive-OS/platform_external_skia,AOSPB/external_skia,YUPlayGodDev/platform_external_skia,spezi77/android_external_skia,ench0/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,DiamondLovesYou/skia-sys,PAC-ROM/android_external_skia,shahrzadmn/skia,TeamEOS/external_chromium_org_third_party_skia,rubenvb/skia,google/skia,Fusion-Rom/external_chromium_org_third_party_skia,MinimalOS/android_external_chromium_org_third_party_skia,Jichao/skia,boulzordev/android_external_skia,MarshedOut/android_external_skia,VRToxin-AOSP/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,w3nd1go/android_external_skia,BrokenROM/external_skia,jtg-gg/skia,boulzordev/android_external_skia,AOSPB/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,TeamExodus/external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,noselhq/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,MyAOSP/external_chromium_org_third_party_skia,OneRom/external_skia,google/skia,rubenvb/skia,VRToxin-AOSP/android_external_skia,TeamExodus/external_skia,nfxosp/platform_external_skia,Hikari-no-Tenshi/android_external_skia,nvoron23/skia,TeamTwisted/external_skia,spezi77/android_external_skia,FusionSP/external_chromium_org_third_party_skia,boulzordev/android_external_skia,rubenvb/skia,tmpvar/skia.cc,Infinitive-OS/platform_external_skia,pcwalton/skia,Infinitive-OS/platform_external_skia,qrealka/skia-hc,MIPS/external-chromium_org-third_party-skia,PAC-ROM/android_external_skia,nvoron23/skia,google/skia,android-ia/platform_external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,tmpvar/skia.cc,ominux/skia,geekboxzone/mmallow_external_skia,qrealka/skia-hc,shahrzadmn/skia,OneRom/external_skia,UBERMALLOW/external_skia,UBERMALLOW/external_skia,todotodoo/skia,chenlian2015/skia_from_google,android-ia/platform_external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,rubenvb/skia,scroggo/skia,DiamondLovesYou/skia-sys,AOSPB/external_skia,pcwalton/skia,TeamExodus/external_skia,BrokenROM/external_skia,tmpvar/skia.cc,todotodoo/skia,boulzordev/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,vanish87/skia,HalCanary/skia-hc,invisiblek/android_external_skia,Igalia/skia,HalCanary/skia-hc,google/skia,Omegaphora/external_chromium_org_third_party_skia,Hikari-no-Tenshi/android_external_skia,boulzordev/android_external_skia,timduru/platform-external-skia,jtg-gg/skia,PAC-ROM/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,timduru/platform-external-skia,UBERMALLOW/external_skia,aosp-mirror/platform_external_skia,Infinitive-OS/platform_external_skia,Igalia/skia,MinimalOS-AOSP/platform_external_skia,tmpvar/skia.cc,ominux/skia,AOSP-YU/platform_external_skia,aosp-mirror/platform_external_skia,MarshedOut/android_external_skia,DARKPOP/external_chromium_org_third_party_skia,TeamTwisted/external_skia,geekboxzone/mmallow_external_skia,AOSP-YU/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,YUPlayGodDev/platform_external_skia,mydongistiny/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,samuelig/skia,geekboxzone/mmallow_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,todotodoo/skia,AOSP-YU/platform_external_skia,todotodoo/skia,noselhq/skia,qrealka/skia-hc,noselhq/skia,Fusion-Rom/external_chromium_org_third_party_skia,AOSP-YU/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,MarshedOut/android_external_skia,OptiPop/external_chromium_org_third_party_skia,shahrzadmn/skia,TeamExodus/external_skia,AOSPB/external_skia,w3nd1go/android_external_skia,vanish87/skia,amyvmiwei/skia,invisiblek/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,Omegaphora/external_chromium_org_third_party_skia,boulzordev/android_external_skia,Jichao/skia