Small code simplification in patch drawing

No behavior change.

Bug: none
Change-Id: I074200e7346a117f998b12d87e37e3aaf5450c9d
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/132750
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nico Weber <thakis@google.com>
diff --git a/core/fpdfapi/render/cpdf_rendershading.cpp b/core/fpdfapi/render/cpdf_rendershading.cpp
index d98e8f9..a524a10 100644
--- a/core/fpdfapi/render/cpdf_rendershading.cpp
+++ b/core/fpdfapi/render/cpdf_rendershading.cpp
@@ -784,17 +784,11 @@
         fill_options.aliased_path = true;
       }
 
-      if (shading_steps) {
-        pDevice->DrawPath(path, nullptr, nullptr,
-                          (*shading_steps)[div_colors[0].comp[0]], 0,
-                          fill_options);
-      } else {
-        pDevice->DrawPath(
-            path, nullptr, nullptr,
-            ArgbEncode(alpha, div_colors[0].comp[0], div_colors[0].comp[1],
-                       div_colors[0].comp[2]),
-            0, fill_options);
-      }
+      FX_ARGB color = shading_steps ? (*shading_steps)[div_colors[0].comp[0]]
+                                    : ArgbEncode(alpha, div_colors[0].comp[0],
+                                                 div_colors[0].comp[1],
+                                                 div_colors[0].comp[2]);
+      pDevice->DrawPath(path, nullptr, nullptr, color, 0, fill_options);
     } else {
       if (d_bottom < kCoonColorThreshold && d_top < kCoonColorThreshold) {
         CubicBezierPatch top_patch;