mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix compile issues in sky on android
R=abarth@chromium.org Review URL: https://codereview.chromium.org/664573003
This commit is contained in:
parent
d71037bb51
commit
3f1969fe24
@ -6,6 +6,9 @@ import("config.gni")
|
||||
if (is_clang) {
|
||||
import("//build/config/clang/clang.gni")
|
||||
}
|
||||
if (is_posix) {
|
||||
import("//build/config/gcc/gcc_version.gni")
|
||||
}
|
||||
|
||||
visibility = ["//sky/*"]
|
||||
|
||||
@ -64,6 +67,10 @@ config("config") {
|
||||
cflags += [ "-Wno-uninitialized" ]
|
||||
}
|
||||
|
||||
if (is_posix && gcc_version >= 49) {
|
||||
cflags += [ "-Wno-unused-but-set-variable" ]
|
||||
}
|
||||
|
||||
if (is_clang) {
|
||||
if (sky_gc_plugin && clang_use_chrome_plugins) {
|
||||
# TODO(GYP)
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
namespace blink {
|
||||
|
||||
struct SameSizeAsElementRareData : NodeRareData {
|
||||
short indices[2];
|
||||
short index;
|
||||
LayoutSize sizeForResizing;
|
||||
IntSize scrollOffset;
|
||||
void* pointers[9];
|
||||
|
||||
@ -16,15 +16,6 @@ source_set("heap") {
|
||||
"Visitor.cpp",
|
||||
"Visitor.h",
|
||||
]
|
||||
if (cpu_arch == "x86" || cpu_arch == "x64") {
|
||||
sources += [ "asm/SaveRegisters_x86.asm" ]
|
||||
} else if (cpu_arch == "arm") {
|
||||
sources += [ "asm/SaveRegisters_arm.S" ]
|
||||
} else if (cpu_arch == "arm64") {
|
||||
sources += [ "asm/SaveRegisters_arm64.S" ]
|
||||
} else if (cpu_arch == "mipsel") {
|
||||
sources += [ "asm/SaveRegisters_mips.S" ]
|
||||
}
|
||||
|
||||
configs += [ "//sky/engine:config" ]
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ using blink::WebThemeEngine;
|
||||
|
||||
namespace sky {
|
||||
|
||||
#if !defined(OS_ANDROID)
|
||||
static ui::NativeTheme::Part NativeThemePart(
|
||||
WebThemeEngine::Part part) {
|
||||
switch (part) {
|
||||
@ -75,6 +76,7 @@ static ui::NativeTheme::State NativeThemeState(
|
||||
return ui::NativeTheme::kDisabled;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void GetNativeThemeExtraParams(
|
||||
WebThemeEngine::Part part,
|
||||
@ -161,10 +163,14 @@ static void GetNativeThemeExtraParams(
|
||||
}
|
||||
|
||||
blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) {
|
||||
#if defined(OS_ANDROID)
|
||||
return blink::WebSize();
|
||||
#else
|
||||
ui::NativeTheme::ExtraParams extra;
|
||||
return ui::NativeTheme::instance()->GetPartSize(NativeThemePart(part),
|
||||
ui::NativeTheme::kNormal,
|
||||
extra);
|
||||
#endif
|
||||
}
|
||||
|
||||
void WebThemeEngineImpl::paint(
|
||||
@ -176,12 +182,14 @@ void WebThemeEngineImpl::paint(
|
||||
ui::NativeTheme::ExtraParams native_theme_extra_params;
|
||||
GetNativeThemeExtraParams(
|
||||
part, state, extra_params, &native_theme_extra_params);
|
||||
#if !defined(OS_ANDROID)
|
||||
ui::NativeTheme::instance()->Paint(
|
||||
canvas,
|
||||
NativeThemePart(part),
|
||||
NativeThemeState(state),
|
||||
gfx::Rect(rect),
|
||||
native_theme_extra_params);
|
||||
#endif
|
||||
}
|
||||
|
||||
void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas,
|
||||
@ -190,6 +198,7 @@ void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas,
|
||||
WebThemeEngine::State endState,
|
||||
double progress,
|
||||
const blink::WebRect& rect) {
|
||||
#if !defined(OS_ANDROID)
|
||||
ui::NativeTheme::instance()->PaintStateTransition(
|
||||
canvas,
|
||||
NativeThemePart(part),
|
||||
@ -197,6 +206,7 @@ void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas,
|
||||
NativeThemeState(endState),
|
||||
progress,
|
||||
gfx::Rect(rect));
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace sky
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user