Reorder RenderResult and RenderDeviceResult in CBC_TwoDimWriter.

They should appear in the order that they are necessarily called.

Change-Id: I6901d384122003f72b0c43bf1df6260e2e196a7d
Reviewed-on: https://pdfium-review.googlesource.com/41050
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
diff --git a/fxbarcode/BC_TwoDimWriter.cpp b/fxbarcode/BC_TwoDimWriter.cpp
index 36e554c..bff37df 100644
--- a/fxbarcode/BC_TwoDimWriter.cpp
+++ b/fxbarcode/BC_TwoDimWriter.cpp
@@ -19,49 +19,6 @@
 
 CBC_TwoDimWriter::~CBC_TwoDimWriter() {}
 
-void CBC_TwoDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
-                                          const CFX_Matrix* matrix) {
-  ASSERT(m_output);
-
-  CFX_GraphStateData stateData;
-  CFX_PathData path;
-  path.AppendRect(0, 0, (float)m_Width, (float)m_Height);
-  device->DrawPath(&path, matrix, &stateData, m_backgroundColor,
-                   m_backgroundColor, FXFILL_ALTERNATE);
-  int32_t leftPos = m_leftPadding;
-  int32_t topPos = m_topPadding;
-
-  CFX_Matrix matri = *matrix;
-  if (m_Width < m_outputWidth && m_Height < m_outputHeight) {
-    CFX_Matrix matriScale(static_cast<float>(m_Width) / m_outputWidth, 0.0, 0.0,
-                          static_cast<float>(m_Height) / m_outputHeight, 0.0,
-                          0.0);
-    matriScale.Concat(*matrix);
-    matri = matriScale;
-  }
-
-  CFX_GraphStateData data;
-  for (int32_t x = 0; x < m_inputWidth; x++) {
-    for (int32_t y = 0; y < m_inputHeight; y++) {
-      if (m_output->Get(x, y)) {
-        // In the output, each module is shifted by 1 due to the one module
-        // padding added to create quiet areas.
-        int start_x_output = x + 1;
-        int end_x_output = x + 2;
-        int start_y_output = y + 1;
-        int end_y_output = y + 2;
-
-        CFX_PathData rect;
-        rect.AppendRect(leftPos + start_x_output * m_multiX,
-                        topPos + start_y_output * m_multiY,
-                        leftPos + end_x_output * m_multiX,
-                        topPos + end_y_output * m_multiY);
-        device->DrawPath(&rect, &matri, &data, m_barColor, 0, FXFILL_WINDING);
-      }
-    }
-  }
-}
-
 int32_t CBC_TwoDimWriter::GetErrorCorrectionLevel() const {
   return m_iCorrectLevel;
 }
@@ -123,3 +80,46 @@
   }
   return true;
 }
+
+void CBC_TwoDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
+                                          const CFX_Matrix* matrix) {
+  ASSERT(m_output);
+
+  CFX_GraphStateData stateData;
+  CFX_PathData path;
+  path.AppendRect(0, 0, (float)m_Width, (float)m_Height);
+  device->DrawPath(&path, matrix, &stateData, m_backgroundColor,
+                   m_backgroundColor, FXFILL_ALTERNATE);
+  int32_t leftPos = m_leftPadding;
+  int32_t topPos = m_topPadding;
+
+  CFX_Matrix matri = *matrix;
+  if (m_Width < m_outputWidth && m_Height < m_outputHeight) {
+    CFX_Matrix matriScale(static_cast<float>(m_Width) / m_outputWidth, 0.0, 0.0,
+                          static_cast<float>(m_Height) / m_outputHeight, 0.0,
+                          0.0);
+    matriScale.Concat(*matrix);
+    matri = matriScale;
+  }
+
+  CFX_GraphStateData data;
+  for (int32_t x = 0; x < m_inputWidth; x++) {
+    for (int32_t y = 0; y < m_inputHeight; y++) {
+      if (m_output->Get(x, y)) {
+        // In the output, each module is shifted by 1 due to the one module
+        // padding added to create quiet areas.
+        int start_x_output = x + 1;
+        int end_x_output = x + 2;
+        int start_y_output = y + 1;
+        int end_y_output = y + 2;
+
+        CFX_PathData rect;
+        rect.AppendRect(leftPos + start_x_output * m_multiX,
+                        topPos + start_y_output * m_multiY,
+                        leftPos + end_x_output * m_multiX,
+                        topPos + end_y_output * m_multiY);
+        device->DrawPath(&rect, &matri, &data, m_barColor, 0, FXFILL_WINDING);
+      }
+    }
+  }
+}