提交 ba2fe445 编写于 作者: C Chinmay Garde

Avoid manually setting up in-process GL bindings for Skia

上级 cb75ca64
......@@ -368,6 +368,30 @@ component("skia") {
"//third_party/skia/src/fonts/SkGScalerContext.h",
]
if (is_ios || is_mac || is_android) {
sources -= [
"//third_party/skia/src/gpu/gl/GrGLCreateNativeInterface_none.cpp"
]
set_sources_assignment_filter([])
if (is_ios) {
sources += [
"//third_party/skia/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp"
]
} else if (is_mac) {
sources += [
"//third_party/skia/src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp"
]
} else if (is_android) {
sources += [
"//third_party/skia/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp"
]
}
set_sources_assignment_filter(sources_assignment_filter)
}
if (is_win) {
sources -= [
# Keeping _win.cpp
......
......@@ -32,8 +32,7 @@ config("inside_blink") {
config("config") {
include_dirs = [
".",
"$root_build_dir",
"$root_gen_dir/sky", # Deprecated, remove.
"$root_out_dir",
]
cflags = []
......
......@@ -5,7 +5,7 @@
#include "sky/engine/core/css/parser/MediaQueryTokenizer.h"
namespace blink {
#include "core/MediaQueryTokenizerCodepoints.cpp"
#include "gen/sky/core/MediaQueryTokenizerCodepoints.cpp"
}
#include "sky/engine/core/css/parser/MediaQueryInputStream.h"
......
......@@ -96,6 +96,10 @@ if (is_android) {
":jni_headers",
":common",
]
ldflags = [
"-lGLESv2",
"-lEGL",
]
}
android_library("java") {
......@@ -159,7 +163,6 @@ if (is_android) {
"//base:base_java",
]
}
} else if (is_ios) {
import("//build/config/ios/rules.gni")
import("//build/config/ios/ios_sdk.gni")
......@@ -198,9 +201,9 @@ if (is_android) {
set_sources_assignment_filter(sources_assignment_filter)
deps = common_deps + [
":common",
"//sky/services/ns_net",
]
":common",
"//sky/services/ns_net",
]
}
deps = [
......@@ -221,9 +224,9 @@ if (is_android) {
]
deps = common_deps + [
":common",
"//sky/services/testing:interfaces",
]
":common",
"//sky/services/testing:interfaces",
]
}
} else if (is_mac) {
import("//build/config/mac/rules.gni")
......@@ -236,9 +239,7 @@ if (is_android) {
# entitlements_path = ""
# code_signing_identity = ""
xibs = [
"mac/sky_mac.xib"
]
xibs = [ "mac/sky_mac.xib" ]
resource_copy_mac("sky_resources") {
resources = [ "//third_party/icu/android/icudtl.dat" ]
......@@ -264,10 +265,10 @@ if (is_android) {
]
deps = common_deps + [
":common",
"//sky/services/ns_net",
"//sky/services/testing:interfaces",
]
":common",
"//sky/services/ns_net",
"//sky/services/testing:interfaces",
]
}
deps = [
......
......@@ -24,7 +24,7 @@ const size_t kMaxGaneshResourceCacheBytes = 96 * 1024 * 1024;
GaneshContext::GaneshContext(scoped_refptr<gfx::GLContext> gl_context)
: gl_context_(gl_context) {
skia::RefPtr<GrGLInterface> interface =
skia::RefPtr<const GrGLInterface> interface =
skia::AdoptRef(gfx::CreateInProcessSkiaGLBinding());
DCHECK(interface);
......
......@@ -13,7 +13,7 @@ namespace gfx {
// The GPU back-end for skia requires pointers to GL functions. This function
// creates a binding for skia-gpu to the in-process GL
GL_EXPORT GrGLInterface* CreateInProcessSkiaGLBinding();
GL_EXPORT const GrGLInterface* CreateInProcessSkiaGLBinding();
} // namespace gfx
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册