Merge AOSP android-9.0.0_r3

Fix conflicts and make it build in 5.1, 6.0, 7.1, 8.1, and 9.0

Change-Id: Ida0a64c29ff27d339b7f42a18d820930964ac6e4
This commit is contained in:
Ethan Yonker
2018-08-24 11:17:39 -05:00
208 changed files with 9097 additions and 4512 deletions
+25 -11
View File
@@ -23,23 +23,31 @@
#include <functional>
#include <string>
#include <vector>
//
// Graphics.
//
struct GRSurface {
int width;
int height;
int row_bytes;
int pixel_bytes;
unsigned char* data;
int width;
int height;
int row_bytes;
int pixel_bytes;
unsigned char* data;
};
struct GRFont {
GRSurface* texture;
int char_width;
int char_height;
GRSurface* texture;
int char_width;
int char_height;
};
enum GRRotation {
ROTATION_NONE = 0,
ROTATION_RIGHT = 1,
ROTATION_DOWN = 2,
ROTATION_LEFT = 3,
};
int gr_init();
@@ -65,15 +73,18 @@ void gr_set_font(__attribute__ ((unused))const char* name);
const GRFont* gr_sys_font();
int gr_init_font(const char* name, GRFont** dest);
void gr_text(const GRFont* font, int x, int y, const char *s, bool bold);
int gr_measure(const GRFont* font, const char *s);
void gr_font_size(const GRFont* font, int *x, int *y);
void gr_text(const GRFont* font, int x, int y, const char* s, bool bold);
int gr_measure(const GRFont* font, const char* s);
void gr_font_size(const GRFont* font, int* x, int* y);
#endif
void gr_blit(GRSurface* source, int sx, int sy, int w, int h, int dx, int dy);
unsigned int gr_get_width(GRSurface* surface);
unsigned int gr_get_height(GRSurface* surface);
// Set rotation, flips gr_fb_width/height if 90 degree rotation difference
void gr_rotate(GRRotation rotation);
//
// Input events.
//
@@ -153,6 +164,9 @@ int res_create_alpha_surface(const char* name, GRSurface** pSurface);
int res_create_localized_alpha_surface(const char* name, const char* locale,
GRSurface** pSurface);
// Return a list of locale strings embedded in |png_name|. Return a empty list in case of failure.
std::vector<std::string> get_locales_in_png(const std::string& png_name);
// Free a surface allocated by any of the res_create_*_surface()
// functions.
void res_free_surface(GRSurface* surface);