summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-03 16:32:19 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-03 16:32:19 +0000
commit232b918d1f0faec230652f4097b834257a7dbb27 (patch)
treec13213ab3d70cc147a6ea59b0f090a51beecae8f /core/fpdfapi/render/cpdf_renderstatus.cpp
parent36d7ad4a24287b562e1d88fcde635e36a167bfe3 (diff)
downloadpdfium-232b918d1f0faec230652f4097b834257a7dbb27.tar.xz
Re-arrange so inline vectors come last in structs.
This might make the memory tools more effective in finding OOBs. Change-Id: Id093bb0a88c37954c80d612ac00b5a168e75bdbf Reviewed-on: https://pdfium-review.googlesource.com/29550 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index d5204fe500..367519ac83 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -696,7 +696,6 @@ int BiInterpolImpl(int c0,
struct Coon_Color {
Coon_Color() { memset(comp, 0, sizeof(int) * 3); }
- int comp[3];
// Returns true if successful, false if overflow detected.
bool BiInterpol(Coon_Color colors[4],
@@ -717,16 +716,12 @@ struct Coon_Color {
return std::max({abs(comp[0] - o.comp[0]), abs(comp[1] - o.comp[1]),
abs(comp[2] - o.comp[2])});
}
+
+ int comp[3];
};
#define COONCOLOR_THRESHOLD 4
struct CPDF_PatchDrawer {
- Coon_Color patch_colors[4];
- int max_delta;
- CFX_PathData path;
- CFX_RenderDevice* pDevice;
- int fill_mode;
- int alpha;
void Draw(int x_scale,
int y_scale,
int left,
@@ -825,6 +820,13 @@ struct CPDF_PatchDrawer {
}
}
}
+
+ int max_delta;
+ CFX_PathData path;
+ CFX_RenderDevice* pDevice;
+ int fill_mode;
+ int alpha;
+ Coon_Color patch_colors[4];
};
void DrawCoonPatchMeshes(