[coreboot-gerrit] Change in libgfxinit[master]: Rename Pos_Type --> Position_Type
Nico Huber (Code Review)
gerrit at coreboot.org
Wed May 30 16:24:52 CEST 2018
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/26696
Change subject: Rename Pos_Type --> Position_Type
......................................................................
Rename Pos_Type --> Position_Type
Yet after few months, it's already too confusing to me. Let's reserve
`Pos` for `Positive` and spell out `Position`.
Change-Id: I3445d20665ae6a993cb0e46d08e8f3148abef40e
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M common/hw-gfx.ads
M gfxtest/hw-gfx-gma-gfx_test.adb
2 files changed, 10 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/96/26696/1
diff --git a/common/hw-gfx.ads b/common/hw-gfx.ads
index 1ab2518..7403a86 100644
--- a/common/hw-gfx.ads
+++ b/common/hw-gfx.ads
@@ -25,9 +25,9 @@
subtype Pos_Pixel_Type is Pixel_Type range 1 .. Pixel_Type'Last;
-- Allow same range for width and height (for rotated framebuffers)
- subtype Width_Type is Pos32 range 1 .. 8192;
- subtype Height_Type is Pos32 range 1 .. 8192;
- subtype Pos_Type is Int32 range 0 .. 4095;
+ subtype Width_Type is Pos32 range 1 .. 8192;
+ subtype Height_Type is Pos32 range 1 .. 8192;
+ subtype Position_Type is Int32 range 0 .. 4095;
Auto_BPC : constant := 5;
subtype BPC_Type is Int64 range Auto_BPC .. 16;
@@ -41,8 +41,8 @@
record
Width : Width_Type;
Height : Height_Type;
- Start_X : Pos_Type;
- Start_Y : Pos_Type;
+ Start_X : Position_Type;
+ Start_Y : Position_Type;
BPC : BPC_Type;
Stride : Width_Type;
V_Stride : Height_Type;
diff --git a/gfxtest/hw-gfx-gma-gfx_test.adb b/gfxtest/hw-gfx-gma-gfx_test.adb
index 94ee312..bf6e917 100644
--- a/gfxtest/hw-gfx-gma-gfx_test.adb
+++ b/gfxtest/hw-gfx-gma-gfx_test.adb
@@ -19,9 +19,9 @@
Secondary_Delay_MS : constant := 4_000;
Seed : constant := 12345;
- package Rand_P is new Ada.Numerics.Discrete_Random (Pos_Type);
+ package Rand_P is new Ada.Numerics.Discrete_Random (Position_Type);
Gen : Rand_P.Generator;
- function Rand return Pos_Type is (Rand_P.Random (Gen));
+ function Rand return Position_Type is (Rand_P.Random (Gen));
Start_X : constant := 0;
Start_Y : constant := 0;
@@ -384,7 +384,7 @@
declare
New_Pipes : GMA.Pipe_Configs := Pipes;
- function Rand_Div (Num : Pos_Type) return Pos_Type is
+ function Rand_Div (Num : Position_Type) return Position_Type is
(case Rand mod 4 is
when 3 => Rand mod Num / 3,
when 2 => Rand mod Num / 2,
@@ -404,9 +404,9 @@
Height : constant Height_Type :=
Pipes (Pipe).Framebuffer.Height;
begin
- New_FB.Start_X := Pos_Type'Min
+ New_FB.Start_X := Position_Type'Min
(Width - 320, Rand_Div (Width));
- New_FB.Start_Y := Pos_Type'Min
+ New_FB.Start_Y := Position_Type'Min
(Height - 320, Rand_Div (Height));
New_FB.Width := Width_Type'Max
(320, Width - New_FB.Start_X - Rand_Div (Width));
--
To view, visit https://review.coreboot.org/26696
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3445d20665ae6a993cb0e46d08e8f3148abef40e
Gerrit-Change-Number: 26696
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180530/b6e07d39/attachment-0001.html>
More information about the coreboot-gerrit
mailing list