Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Side by Side Diff: lib/gfxconsole/gfxconsole.c

Issue 1777783003: [display] Refactor to avoid implicit framebuffer allocation. (Closed) Base URL: https://github.com/littlekernel/lk.git@master
Patch Set: fix stride confusion Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/gfx/gfx.c ('k') | lib/text/text.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008-2010, 2015 Travis Geiselbrecht 2 * Copyright (c) 2008-2010, 2015 Travis Geiselbrecht
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining 4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files 5 * a copy of this software and associated documentation files
6 * (the "Software"), to deal in the Software without restriction, 6 * (the "Software"), to deal in the Software without restriction,
7 * including without limitation the rights to use, copy, modify, merge, 7 * including without limitation the rights to use, copy, modify, merge,
8 * publish, distribute, sublicense, and/or sell copies of the Software, 8 * publish, distribute, sublicense, and/or sell copies of the Software,
9 * and to permit persons to whom the Software is furnished to do so, 9 * and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions: 10 * subject to the following conditions:
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 * @brief Initialize graphics console on default display 157 * @brief Initialize graphics console on default display
158 */ 158 */
159 void gfxconsole_start_on_display(void) 159 void gfxconsole_start_on_display(void)
160 { 160 {
161 static bool started = false; 161 static bool started = false;
162 162
163 if (started) 163 if (started)
164 return; 164 return;
165 165
166 /* pop up the console */ 166 /* pop up the console */
167 struct display_info info; 167 struct display_framebuffer fb;
168 if (display_get_info(&info) < 0) 168 if (display_get_framebuffer(&fb) < 0)
169 return; 169 return;
170 170
171 gfx_surface *s = gfx_create_surface_from_display(&info); 171 gfx_surface *s = gfx_create_surface_from_display(&fb);
172 gfxconsole_start(s); 172 gfxconsole_start(s);
173 started = true; 173 started = true;
174 } 174 }
175 175
176 static void gfxconsole_init_hook(uint level) 176 static void gfxconsole_init_hook(uint level)
177 { 177 {
178 gfxconsole_start_on_display(); 178 gfxconsole_start_on_display();
179 } 179 }
180 180
181 LK_INIT_HOOK(gfxconsole, &gfxconsole_init_hook, LK_INIT_LEVEL_PLATFORM); 181 LK_INIT_HOOK(gfxconsole, &gfxconsole_init_hook, LK_INIT_LEVEL_PLATFORM);
OLDNEW
« no previous file with comments | « lib/gfx/gfx.c ('k') | lib/text/text.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698