Cleanup: Move Text Editor runtime data to a separate allocation #115418

Closed
Guillermo Venegas wants to merge 12 commits from guishe:move-text-runtime into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Contributor

The struct SpaceText_Runtime already separates
runtime data from SpaceText, however it is still
allocated inside SpaceText, read and write file operations
still copy this data, but is override on read.

This changes separate allocation of SpaceText_Runtime from
SpaceText.


There is WIP that benefits from this changes #115417
Part of improvements listed in #115428

The struct `SpaceText_Runtime` already separates runtime data from `SpaceText`, however it is still allocated inside `SpaceText`, read and write file operations still copy this data, but is override on read. This changes separate allocation of `SpaceText_Runtime` from `SpaceText`. ------- There is WIP that benefits from this changes https://projects.blender.org/blender/blender/pulls/115417 Part of improvements listed in https://projects.blender.org/blender/blender/issues/115428
Guillermo Venegas added 1 commit 2023-11-25 19:36:49 +01:00
Iliya Katushenock added this to the Python API project 2023-11-25 19:48:03 +01:00
Iliya Katushenock added the
Interest
Text Editor
label 2023-11-25 19:48:08 +01:00
Guillermo Venegas added 1 commit 2023-11-25 19:52:02 +01:00
Guillermo Venegas added 1 commit 2023-11-25 19:54:30 +01:00
Guillermo Venegas added 1 commit 2023-11-25 19:57:06 +01:00
Guillermo Venegas added 2 commits 2023-11-27 03:26:59 +01:00
Guillermo Venegas requested review from Campbell Barton 2023-11-27 20:51:44 +01:00
Guillermo Venegas added 2 commits 2023-12-05 23:28:40 +01:00
Campbell Barton requested changes 2024-01-11 04:52:49 +01:00
@ -15,6 +17,40 @@ struct UndoStep;
struct UndoType;
struct bContext;
struct SpaceText_Runtime {

This is a public header, I'd rather this follow SpaceSpreadsheet_Runtime which defines run-time data in source/blender/editors/space_spreadsheet/spreadsheet_intern.hh (a new header would have to be added for the text editor space).

This is a public header, I'd rather this follow `SpaceSpreadsheet_Runtime` which defines run-time data in `source/blender/editors/space_spreadsheet/spreadsheet_intern.hh` (a new header would have to be added for the text editor space).
Author
Contributor

moved to text_intern.hh
the file is only used in c++ files but still has a global extern "C" { guard (currently only requiered for a single line extern const char *text_context_dir[]; /* doc access */)

moved to `text_intern.hh` the file is only used in c++ files but still has a global `extern "C" {` guard (currently only requiered for a single line `extern const char *text_context_dir[]; /* doc access */`)
guishe marked this conversation as resolved
Campbell Barton reviewed 2024-01-11 04:53:35 +01:00
@ -18,0 +45,4 @@
*/
int scroll_ofs_px[2];
char _pad1[4];

Explicit padding is no longer needed.

Explicit padding is no longer needed.
guishe marked this conversation as resolved
Guillermo Venegas added 2 commits 2024-01-11 17:44:47 +01:00
Guillermo Venegas added 1 commit 2024-01-11 17:49:25 +01:00
Guillermo Venegas requested review from Campbell Barton 2024-01-11 17:54:03 +01:00
Guillermo Venegas added 1 commit 2024-01-11 21:47:32 +01:00

Committed 950759a526 with a minor change (moved ED_text_visible_lines_get into text_draw.cc).

Committed 950759a52672f16759c0c123d19a7e4873cef6e5 with a minor change (moved ED_text_visible_lines_get into `text_draw.cc`).
Campbell Barton closed this pull request 2024-01-12 04:02:46 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#115418
No description provided.