• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by gen_overlay_widgets.py using data from overlay_widgets.json.
3 //
4 // Copyright 2019 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // Overlay_autogen.cpp:
9 //   Autogenerated overlay widget declarations.
10 
11 #include "libANGLE/Overlay.h"
12 #include "libANGLE/OverlayWidgets.h"
13 #include "libANGLE/Overlay_font_autogen.h"
14 #include "libANGLE/renderer/driver_utils.h"
15 
16 namespace gl
17 {
18 using namespace overlay;
19 
20 namespace
21 {
GetFontSize(int fontSize,bool largeFont)22 int GetFontSize(int fontSize, bool largeFont)
23 {
24     if (largeFont && fontSize > 0)
25     {
26         return fontSize - 1;
27     }
28     return fontSize;
29 }
30 }  // anonymous namespace
31 
initOverlayWidgets()32 void Overlay::initOverlayWidgets()
33 {
34     const bool kLargeFont = rx::IsAndroid();
35 
36     {
37         PerSecond *widget = new PerSecond;
38         {
39             const int32_t fontSize = GetFontSize(kFontMipLarge, kLargeFont);
40             const int32_t offsetX  = 10;
41             const int32_t offsetY  = 10;
42             const int32_t width    = 12 * (kFontGlyphWidth >> fontSize);
43             const int32_t height   = (kFontGlyphHeight >> fontSize);
44 
45             widget->type      = WidgetType::PerSecond;
46             widget->fontSize  = fontSize;
47             widget->coords[0] = offsetX;
48             widget->coords[1] = offsetY;
49             widget->coords[2] = offsetX + width;
50             widget->coords[3] = offsetY + height;
51             widget->color[0]  = 0.4980392156862745f;
52             widget->color[1]  = 0.7490196078431373f;
53             widget->color[2]  = 1.0f;
54             widget->color[3]  = 1.0f;
55         }
56         mState.mOverlayWidgets[WidgetId::FPS].reset(widget);
57     }
58 
59     {
60         Text *widget = new Text;
61         {
62             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
63             const int32_t offsetX  = 10;
64             const int32_t offsetY  = -10;
65             const int32_t width    = 150 * (kFontGlyphWidth >> fontSize);
66             const int32_t height   = (kFontGlyphHeight >> fontSize);
67 
68             widget->type      = WidgetType::Text;
69             widget->fontSize  = fontSize;
70             widget->coords[0] = offsetX;
71             widget->coords[1] = offsetY - height;
72             widget->coords[2] = offsetX + width;
73             widget->coords[3] = offsetY;
74             widget->color[0]  = 1.0f;
75             widget->color[1]  = 0.0f;
76             widget->color[2]  = 0.0f;
77             widget->color[3]  = 1.0f;
78         }
79         mState.mOverlayWidgets[WidgetId::VulkanLastValidationMessage].reset(widget);
80     }
81 
82     {
83         Count *widget = new Count;
84         {
85             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
86             const int32_t offsetX  = 10;
87             const int32_t offsetY =
88                 mState.mOverlayWidgets[WidgetId::VulkanLastValidationMessage]->coords[1];
89             const int32_t width  = 25 * (kFontGlyphWidth >> fontSize);
90             const int32_t height = (kFontGlyphHeight >> fontSize);
91 
92             widget->type      = WidgetType::Count;
93             widget->fontSize  = fontSize;
94             widget->coords[0] = offsetX;
95             widget->coords[1] = offsetY - height;
96             widget->coords[2] = offsetX + width;
97             widget->coords[3] = offsetY;
98             widget->color[0]  = 1.0f;
99             widget->color[1]  = 0.0f;
100             widget->color[2]  = 0.0f;
101             widget->color[3]  = 1.0f;
102         }
103         mState.mOverlayWidgets[WidgetId::VulkanValidationMessageCount].reset(widget);
104     }
105 
106     {
107         RunningGraph *widget = new RunningGraph(60);
108         {
109             const int32_t fontSize = GetFontSize(0, kLargeFont);
110             const int32_t offsetX  = 10;
111             const int32_t offsetY  = 100;
112             const int32_t width    = 5 * static_cast<uint32_t>(widget->runningValues.size());
113             const int32_t height   = 100;
114 
115             widget->type      = WidgetType::RunningGraph;
116             widget->fontSize  = fontSize;
117             widget->coords[0] = offsetX;
118             widget->coords[1] = offsetY;
119             widget->coords[2] = offsetX + width;
120             widget->coords[3] = offsetY + height;
121             widget->color[0]  = 0.29411764705882354f;
122             widget->color[1]  = 0.7843137254901961f;
123             widget->color[2]  = 0.0f;
124             widget->color[3]  = 0.7843137254901961f;
125         }
126         mState.mOverlayWidgets[WidgetId::VulkanRenderPassCount].reset(widget);
127         {
128             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
129             const int32_t offsetX =
130                 mState.mOverlayWidgets[WidgetId::VulkanRenderPassCount]->coords[0];
131             const int32_t offsetY =
132                 mState.mOverlayWidgets[WidgetId::VulkanRenderPassCount]->coords[1];
133             const int32_t width  = 40 * (kFontGlyphWidth >> fontSize);
134             const int32_t height = (kFontGlyphHeight >> fontSize);
135 
136             widget->description.type      = WidgetType::Text;
137             widget->description.fontSize  = fontSize;
138             widget->description.coords[0] = offsetX;
139             widget->description.coords[1] = std::max(offsetY - height, 1);
140             widget->description.coords[2] = offsetX + width;
141             widget->description.coords[3] = offsetY;
142             widget->description.color[0]  = 0.29411764705882354f;
143             widget->description.color[1]  = 0.7843137254901961f;
144             widget->description.color[2]  = 0.0f;
145             widget->description.color[3]  = 1.0f;
146         }
147     }
148 
149     {
150         RunningHistogram *widget = new RunningHistogram(100);
151         {
152             const int32_t fontSize = GetFontSize(0, kLargeFont);
153             const int32_t offsetX  = -50;
154             const int32_t offsetY  = 100;
155             const int32_t width    = 6 * static_cast<uint32_t>(widget->runningValues.size());
156             const int32_t height   = 100;
157 
158             widget->type      = WidgetType::RunningHistogram;
159             widget->fontSize  = fontSize;
160             widget->coords[0] = offsetX - width;
161             widget->coords[1] = offsetY;
162             widget->coords[2] = offsetX;
163             widget->coords[3] = offsetY + height;
164             widget->color[0]  = 1.0f;
165             widget->color[1]  = 0.7843137254901961f;
166             widget->color[2]  = 0.29411764705882354f;
167             widget->color[3]  = 0.7843137254901961f;
168         }
169         mState.mOverlayWidgets[WidgetId::VulkanRenderPassBufferCount].reset(widget);
170         {
171             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
172             const int32_t offsetX =
173                 mState.mOverlayWidgets[WidgetId::VulkanRenderPassBufferCount]->coords[0];
174             const int32_t offsetY =
175                 mState.mOverlayWidgets[WidgetId::VulkanRenderPassBufferCount]->coords[1];
176             const int32_t width  = 40 * (kFontGlyphWidth >> fontSize);
177             const int32_t height = (kFontGlyphHeight >> fontSize);
178 
179             widget->description.type      = WidgetType::Text;
180             widget->description.fontSize  = fontSize;
181             widget->description.coords[0] = offsetX;
182             widget->description.coords[1] = std::max(offsetY - height, 1);
183             widget->description.coords[2] = std::min(offsetX + width, -1);
184             widget->description.coords[3] = offsetY;
185             widget->description.color[0]  = 1.0f;
186             widget->description.color[1]  = 0.7843137254901961f;
187             widget->description.color[2]  = 0.29411764705882354f;
188             widget->description.color[3]  = 1.0f;
189         }
190     }
191 
192     {
193         RunningHistogram *widget = new RunningHistogram(50);
194         {
195             const int32_t fontSize = GetFontSize(0, kLargeFont);
196             const int32_t offsetX  = -50;
197             const int32_t offsetY  = 100;
198             const int32_t width    = 6 * static_cast<uint32_t>(widget->runningValues.size());
199             const int32_t height   = 100;
200 
201             widget->type      = WidgetType::RunningHistogram;
202             widget->fontSize  = fontSize;
203             widget->coords[0] = offsetX - width;
204             widget->coords[1] = offsetY;
205             widget->coords[2] = offsetX;
206             widget->coords[3] = offsetY + height;
207             widget->color[0]  = 1.0f;
208             widget->color[1]  = 0.7843137254901961f;
209             widget->color[2]  = 0.29411764705882354f;
210             widget->color[3]  = 0.7843137254901961f;
211         }
212         mState.mOverlayWidgets[WidgetId::VulkanSecondaryCommandBufferPoolWaste].reset(widget);
213         {
214             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
215             const int32_t offsetX =
216                 mState.mOverlayWidgets[WidgetId::VulkanSecondaryCommandBufferPoolWaste]->coords[0];
217             const int32_t offsetY =
218                 mState.mOverlayWidgets[WidgetId::VulkanSecondaryCommandBufferPoolWaste]->coords[1];
219             const int32_t width  = 40 * (kFontGlyphWidth >> fontSize);
220             const int32_t height = (kFontGlyphHeight >> fontSize);
221 
222             widget->description.type      = WidgetType::Text;
223             widget->description.fontSize  = fontSize;
224             widget->description.coords[0] = offsetX;
225             widget->description.coords[1] = std::max(offsetY - height, 1);
226             widget->description.coords[2] = std::min(offsetX + width, -1);
227             widget->description.coords[3] = offsetY;
228             widget->description.color[0]  = 1.0f;
229             widget->description.color[1]  = 0.7843137254901961f;
230             widget->description.color[2]  = 0.29411764705882354f;
231             widget->description.color[3]  = 1.0f;
232         }
233     }
234 
235     {
236         RunningGraph *widget = new RunningGraph(60);
237         {
238             const int32_t fontSize = GetFontSize(0, kLargeFont);
239             const int32_t offsetX  = 10;
240             const int32_t offsetY  = 220;
241             const int32_t width    = 5 * static_cast<uint32_t>(widget->runningValues.size());
242             const int32_t height   = 100;
243 
244             widget->type      = WidgetType::RunningGraph;
245             widget->fontSize  = fontSize;
246             widget->coords[0] = offsetX;
247             widget->coords[1] = offsetY;
248             widget->coords[2] = offsetX + width;
249             widget->coords[3] = offsetY + height;
250             widget->color[0]  = 0.29411764705882354f;
251             widget->color[1]  = 0.7843137254901961f;
252             widget->color[2]  = 0.0f;
253             widget->color[3]  = 0.7843137254901961f;
254         }
255         mState.mOverlayWidgets[WidgetId::VulkanWriteDescriptorSetCount].reset(widget);
256         {
257             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
258             const int32_t offsetX =
259                 mState.mOverlayWidgets[WidgetId::VulkanWriteDescriptorSetCount]->coords[0];
260             const int32_t offsetY =
261                 mState.mOverlayWidgets[WidgetId::VulkanWriteDescriptorSetCount]->coords[1];
262             const int32_t width  = 40 * (kFontGlyphWidth >> fontSize);
263             const int32_t height = (kFontGlyphHeight >> fontSize);
264 
265             widget->description.type      = WidgetType::Text;
266             widget->description.fontSize  = fontSize;
267             widget->description.coords[0] = offsetX;
268             widget->description.coords[1] = std::max(offsetY - height, 1);
269             widget->description.coords[2] = offsetX + width;
270             widget->description.coords[3] = offsetY;
271             widget->description.color[0]  = 0.29411764705882354f;
272             widget->description.color[1]  = 0.7843137254901961f;
273             widget->description.color[2]  = 0.0f;
274             widget->description.color[3]  = 1.0f;
275         }
276     }
277 
278     {
279         RunningGraph *widget = new RunningGraph(60);
280         {
281             const int32_t fontSize = GetFontSize(0, kLargeFont);
282             const int32_t offsetX  = 0;
283             const int32_t offsetY  = 250;
284             const int32_t width    = 6 * static_cast<uint32_t>(widget->runningValues.size());
285             const int32_t height   = 100;
286 
287             widget->type      = WidgetType::RunningGraph;
288             widget->fontSize  = fontSize;
289             widget->coords[0] = offsetX;
290             widget->coords[1] = offsetY;
291             widget->coords[2] = offsetX + width;
292             widget->coords[3] = offsetY + height;
293             widget->color[0]  = 1.0f;
294             widget->color[1]  = 0.0f;
295             widget->color[2]  = 0.29411764705882354f;
296             widget->color[3]  = 0.7843137254901961f;
297         }
298         mState.mOverlayWidgets[WidgetId::VulkanDescriptorSetAllocations].reset(widget);
299         {
300             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
301             const int32_t offsetX =
302                 mState.mOverlayWidgets[WidgetId::VulkanDescriptorSetAllocations]->coords[0];
303             const int32_t offsetY =
304                 mState.mOverlayWidgets[WidgetId::VulkanDescriptorSetAllocations]->coords[1];
305             const int32_t width  = 40 * (kFontGlyphWidth >> fontSize);
306             const int32_t height = (kFontGlyphHeight >> fontSize);
307 
308             widget->description.type      = WidgetType::Text;
309             widget->description.fontSize  = fontSize;
310             widget->description.coords[0] = offsetX;
311             widget->description.coords[1] = std::max(offsetY - height, 1);
312             widget->description.coords[2] = offsetX + width;
313             widget->description.coords[3] = offsetY;
314             widget->description.color[0]  = 1.0f;
315             widget->description.color[1]  = 0.0f;
316             widget->description.color[2]  = 0.29411764705882354f;
317             widget->description.color[3]  = 1.0f;
318         }
319     }
320 
321     {
322         RunningGraph *widget = new RunningGraph(60);
323         {
324             const int32_t fontSize = GetFontSize(0, kLargeFont);
325             const int32_t offsetX  = -50;
326             const int32_t offsetY  = 360;
327             const int32_t width    = 6 * static_cast<uint32_t>(widget->runningValues.size());
328             const int32_t height   = 100;
329 
330             widget->type      = WidgetType::RunningGraph;
331             widget->fontSize  = fontSize;
332             widget->coords[0] = offsetX - width;
333             widget->coords[1] = offsetY;
334             widget->coords[2] = offsetX;
335             widget->coords[3] = offsetY + height;
336             widget->color[0]  = 1.0f;
337             widget->color[1]  = 0.0f;
338             widget->color[2]  = 0.29411764705882354f;
339             widget->color[3]  = 0.7843137254901961f;
340         }
341         mState.mOverlayWidgets[WidgetId::VulkanShaderResourceDSHitRate].reset(widget);
342         {
343             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
344             const int32_t offsetX =
345                 mState.mOverlayWidgets[WidgetId::VulkanShaderResourceDSHitRate]->coords[0];
346             const int32_t offsetY =
347                 mState.mOverlayWidgets[WidgetId::VulkanShaderResourceDSHitRate]->coords[1];
348             const int32_t width  = 40 * (kFontGlyphWidth >> fontSize);
349             const int32_t height = (kFontGlyphHeight >> fontSize);
350 
351             widget->description.type      = WidgetType::Text;
352             widget->description.fontSize  = fontSize;
353             widget->description.coords[0] = offsetX;
354             widget->description.coords[1] = std::max(offsetY - height, 1);
355             widget->description.coords[2] = std::min(offsetX + width, -1);
356             widget->description.coords[3] = offsetY;
357             widget->description.color[0]  = 1.0f;
358             widget->description.color[1]  = 0.0f;
359             widget->description.color[2]  = 0.29411764705882354f;
360             widget->description.color[3]  = 1.0f;
361         }
362     }
363 
364     {
365         RunningGraph *widget = new RunningGraph(120);
366         {
367             const int32_t fontSize = GetFontSize(0, kLargeFont);
368             const int32_t offsetX  = -50;
369             const int32_t offsetY  = -50;
370             const int32_t width    = 5 * static_cast<uint32_t>(widget->runningValues.size());
371             const int32_t height   = 100;
372 
373             widget->type      = WidgetType::RunningGraph;
374             widget->fontSize  = fontSize;
375             widget->coords[0] = offsetX - width;
376             widget->coords[1] = offsetY - height;
377             widget->coords[2] = offsetX;
378             widget->coords[3] = offsetY;
379             widget->color[0]  = 0.0f;
380             widget->color[1]  = 0.7843137254901961f;
381             widget->color[2]  = 0.29411764705882354f;
382             widget->color[3]  = 0.7843137254901961f;
383         }
384         mState.mOverlayWidgets[WidgetId::VulkanDynamicBufferAllocations].reset(widget);
385         {
386             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
387             const int32_t offsetX =
388                 mState.mOverlayWidgets[WidgetId::VulkanDynamicBufferAllocations]->coords[2];
389             const int32_t offsetY =
390                 mState.mOverlayWidgets[WidgetId::VulkanDynamicBufferAllocations]->coords[1];
391             const int32_t width  = 40 * (kFontGlyphWidth >> fontSize);
392             const int32_t height = (kFontGlyphHeight >> fontSize);
393 
394             widget->description.type      = WidgetType::Text;
395             widget->description.fontSize  = fontSize;
396             widget->description.coords[0] = offsetX - width;
397             widget->description.coords[1] = offsetY - height;
398             widget->description.coords[2] = offsetX;
399             widget->description.coords[3] = offsetY;
400             widget->description.color[0]  = 0.0f;
401             widget->description.color[1]  = 0.7843137254901961f;
402             widget->description.color[2]  = 0.29411764705882354f;
403             widget->description.color[3]  = 1.0f;
404         }
405     }
406 
407     {
408         RunningGraph *widget = new RunningGraph(60);
409         {
410             const int32_t fontSize = GetFontSize(0, kLargeFont);
411             const int32_t offsetX  = 0;
412             const int32_t offsetY  = 450;
413             const int32_t width    = 5 * static_cast<uint32_t>(widget->runningValues.size());
414             const int32_t height   = 100;
415 
416             widget->type      = WidgetType::RunningGraph;
417             widget->fontSize  = fontSize;
418             widget->coords[0] = offsetX;
419             widget->coords[1] = offsetY;
420             widget->coords[2] = offsetX + width;
421             widget->coords[3] = offsetY + height;
422             widget->color[0]  = 0.0f;
423             widget->color[1]  = 0.7843137254901961f;
424             widget->color[2]  = 0.7254901960784313f;
425             widget->color[3]  = 0.7843137254901961f;
426         }
427         mState.mOverlayWidgets[WidgetId::VulkanDescriptorCacheSize].reset(widget);
428         {
429             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
430             const int32_t offsetX =
431                 mState.mOverlayWidgets[WidgetId::VulkanDescriptorCacheSize]->coords[0];
432             const int32_t offsetY =
433                 mState.mOverlayWidgets[WidgetId::VulkanDescriptorCacheSize]->coords[1];
434             const int32_t width  = 90 * (kFontGlyphWidth >> fontSize);
435             const int32_t height = (kFontGlyphHeight >> fontSize);
436 
437             widget->description.type      = WidgetType::Text;
438             widget->description.fontSize  = fontSize;
439             widget->description.coords[0] = offsetX;
440             widget->description.coords[1] = std::max(offsetY - height, 1);
441             widget->description.coords[2] = offsetX + width;
442             widget->description.coords[3] = offsetY;
443             widget->description.color[0]  = 0.0f;
444             widget->description.color[1]  = 0.7843137254901961f;
445             widget->description.color[2]  = 0.29411764705882354f;
446             widget->description.color[3]  = 1.0f;
447         }
448     }
449 
450     {
451         RunningGraph *widget = new RunningGraph(60);
452         {
453             const int32_t fontSize = GetFontSize(0, kLargeFont);
454             const int32_t offsetX  = 0;
455             const int32_t offsetY  = 450;
456             const int32_t width    = 5 * static_cast<uint32_t>(widget->runningValues.size());
457             const int32_t height   = 100;
458 
459             widget->type      = WidgetType::RunningGraph;
460             widget->fontSize  = fontSize;
461             widget->coords[0] = offsetX;
462             widget->coords[1] = offsetY;
463             widget->coords[2] = offsetX + width;
464             widget->coords[3] = offsetY + height;
465             widget->color[0]  = 0.0f;
466             widget->color[1]  = 0.7843137254901961f;
467             widget->color[2]  = 0.29411764705882354f;
468             widget->color[3]  = 0.7843137254901961f;
469         }
470         mState.mOverlayWidgets[WidgetId::VulkanTextureDescriptorCacheSize].reset(widget);
471         {
472             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
473             const int32_t offsetX =
474                 mState.mOverlayWidgets[WidgetId::VulkanTextureDescriptorCacheSize]->coords[0];
475             const int32_t offsetY =
476                 mState.mOverlayWidgets[WidgetId::VulkanTextureDescriptorCacheSize]->coords[1];
477             const int32_t width  = 90 * (kFontGlyphWidth >> fontSize);
478             const int32_t height = (kFontGlyphHeight >> fontSize);
479 
480             widget->description.type      = WidgetType::Text;
481             widget->description.fontSize  = fontSize;
482             widget->description.coords[0] = offsetX;
483             widget->description.coords[1] = std::max(offsetY - height, 1);
484             widget->description.coords[2] = offsetX + width;
485             widget->description.coords[3] = offsetY;
486             widget->description.color[0]  = 0.0f;
487             widget->description.color[1]  = 0.7843137254901961f;
488             widget->description.color[2]  = 0.29411764705882354f;
489             widget->description.color[3]  = 1.0f;
490         }
491     }
492 
493     {
494         RunningGraph *widget = new RunningGraph(60);
495         {
496             const int32_t fontSize = GetFontSize(0, kLargeFont);
497             const int32_t offsetX  = 0;
498             const int32_t offsetY  = 450;
499             const int32_t width    = 5 * static_cast<uint32_t>(widget->runningValues.size());
500             const int32_t height   = 100;
501 
502             widget->type      = WidgetType::RunningGraph;
503             widget->fontSize  = fontSize;
504             widget->coords[0] = offsetX;
505             widget->coords[1] = offsetY;
506             widget->coords[2] = offsetX + width;
507             widget->coords[3] = offsetY + height;
508             widget->color[0]  = 0.0f;
509             widget->color[1]  = 0.7843137254901961f;
510             widget->color[2]  = 1.1764705882352942f;
511             widget->color[3]  = 0.7843137254901961f;
512         }
513         mState.mOverlayWidgets[WidgetId::VulkanUniformDescriptorCacheSize].reset(widget);
514         {
515             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
516             const int32_t offsetX =
517                 mState.mOverlayWidgets[WidgetId::VulkanUniformDescriptorCacheSize]->coords[0];
518             const int32_t offsetY =
519                 mState.mOverlayWidgets[WidgetId::VulkanUniformDescriptorCacheSize]->coords[1];
520             const int32_t width  = 90 * (kFontGlyphWidth >> fontSize);
521             const int32_t height = (kFontGlyphHeight >> fontSize);
522 
523             widget->description.type      = WidgetType::Text;
524             widget->description.fontSize  = fontSize;
525             widget->description.coords[0] = offsetX;
526             widget->description.coords[1] = std::max(offsetY - height, 1);
527             widget->description.coords[2] = offsetX + width;
528             widget->description.coords[3] = offsetY;
529             widget->description.color[0]  = 0.0f;
530             widget->description.color[1]  = 0.7843137254901961f;
531             widget->description.color[2]  = 0.29411764705882354f;
532             widget->description.color[3]  = 1.0f;
533         }
534     }
535 
536     {
537         Count *widget = new Count;
538         {
539             const int32_t fontSize = GetFontSize(kFontMipSmall, kLargeFont);
540             const int32_t offsetX  = 10;
541             const int32_t offsetY  = 100;
542             const int32_t width    = 30 * (kFontGlyphWidth >> fontSize);
543             const int32_t height   = (kFontGlyphHeight >> fontSize);
544 
545             widget->type      = WidgetType::Count;
546             widget->fontSize  = fontSize;
547             widget->coords[0] = offsetX;
548             widget->coords[1] = offsetY;
549             widget->coords[2] = offsetX + width;
550             widget->coords[3] = offsetY + height;
551             widget->color[0]  = 1.0f;
552             widget->color[1]  = 1.0f;
553             widget->color[2]  = 1.0f;
554             widget->color[3]  = 1.0f;
555         }
556         mState.mOverlayWidgets[WidgetId::VulkanDescriptorCacheKeySize].reset(widget);
557     }
558 }
559 
560 }  // namespace gl
561