Skip to content

Commit

Permalink
context_private_call.cpp -> context_private_call.inl.h
Browse files Browse the repository at this point in the history
Most functions are trivial wrappers resulting in unnecessary forwarding
calls. Most are called exactly once from entry points autogen.
This _reduces_ the .so size by ~14KB and I'm seeing 1-2% better frame
time in my driver_overhead_2 tests on a mobile device.

Bug: b/383305597
Change-Id: I1f2a048e067c76993bacfbbce655fc1c898fdba7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6149814
Reviewed-by: Shahbaz Youssefi <[email protected]>
  • Loading branch information
romanl-g committed Jan 7, 2025
1 parent 8304737 commit 465299f
Show file tree
Hide file tree
Showing 14 changed files with 1,515 additions and 1,504 deletions.
14 changes: 7 additions & 7 deletions scripts/code_generation_hashes/GL_EGL_entry_points.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts/entry_point_packed_gl_enums.json":
"57a3a729fd25032bc336f4b6a55bc238",
"scripts/generate_entry_points.py":
"45523f949dabe814d582ac8d210c8282",
"793ec29109fe56483c84c7f10fa7a6b2",
"scripts/gl_angle_ext.xml":
"ef111314bcf6e8c9cdc1a391080f1d80",
"scripts/registry_xml.py":
Expand Down Expand Up @@ -104,27 +104,27 @@
"src/libGLESv2/entry_points_egl_ext_autogen.h":
"188e11ee9766112e90927be67d77dbf9",
"src/libGLESv2/entry_points_gles_1_0_autogen.cpp":
"d56a79ab4958b359bffa7f438d106b3e",
"0a3aa3cab080699692a1290306dd54f2",
"src/libGLESv2/entry_points_gles_1_0_autogen.h":
"1d3aef77845a416497070985a8e9cb31",
"src/libGLESv2/entry_points_gles_2_0_autogen.cpp":
"214ed205786801a3847ef19c6619490a",
"505d868829b560e08a9742a3d1257d94",
"src/libGLESv2/entry_points_gles_2_0_autogen.h":
"691c60c2dfed9beca68aa1f32aa2c71b",
"src/libGLESv2/entry_points_gles_3_0_autogen.cpp":
"7c6d638d2f783c5861b45341e1ef296e",
"6d64891e3ae131677c362c523122f324",
"src/libGLESv2/entry_points_gles_3_0_autogen.h":
"4ac2582759cdc6a30f78f83ab684d555",
"src/libGLESv2/entry_points_gles_3_1_autogen.cpp":
"b3006ef277b9f1c2fb30b1677802782e",
"d8de40f06307d617b19b09eb9bf94fe9",
"src/libGLESv2/entry_points_gles_3_1_autogen.h":
"a7327c330a91665fc31accbb78793b42",
"src/libGLESv2/entry_points_gles_3_2_autogen.cpp":
"f2d1cedd279e1673c8e6034527d93bd2",
"db95c356d32ec25fad5e63ee70461da3",
"src/libGLESv2/entry_points_gles_3_2_autogen.h":
"647f932a299cdb4726b60bbba059f0d2",
"src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"e957faa40453ac81ec3ea00cc8c15a85",
"5b3b239852b83eb2ff58dab3098211c8",
"src/libGLESv2/entry_points_gles_ext_autogen.h":
"c684000f5cf5edf378e5fffc801a706d",
"src/libGLESv2/libGLESv2_autogen.cpp":
Expand Down
1 change: 1 addition & 0 deletions scripts/generate_entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ class ErrorSet;
#include "libANGLE/Context.h"
#include "libANGLE/Context.inl.h"
#include "libANGLE/context_private_call_autogen.h"
#include "libANGLE/context_private_call.inl.h"
#include "libANGLE/capture/capture_{header_version}_autogen.h"
#include "libANGLE/validation{validation_header_version}.h"
#include "libANGLE/entry_points_utils.h"
Expand Down
1 change: 1 addition & 0 deletions src/libANGLE/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "libANGLE/VertexArray.h"
#include "libANGLE/capture/FrameCapture.h"
#include "libANGLE/capture/serialize.h"
#include "libANGLE/context_private_call.inl.h"
#include "libANGLE/context_private_call_autogen.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/queryconversions.h"
Expand Down
2 changes: 1 addition & 1 deletion src/libANGLE/GLES1Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "libANGLE/ResourceManager.h"
#include "libANGLE/Shader.h"
#include "libANGLE/State.h"
#include "libANGLE/context_private_call_autogen.h"
#include "libANGLE/context_private_call.inl.h"
#include "libANGLE/renderer/ContextImpl.h"

namespace
Expand Down
2 changes: 1 addition & 1 deletion src/libANGLE/PixelLocalStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "common/FixedVector.h"
#include "libANGLE/Context.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/context_private_call_autogen.h"
#include "libANGLE/context_private_call.inl.h"
#include "libANGLE/renderer/ContextImpl.h"
#include "libANGLE/renderer/TextureImpl.h"

Expand Down
Loading

0 comments on commit 465299f

Please sign in to comment.