Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(367)

Issue 7102045: Use the NDK's cpu-features library when building skia for Chromium/Android. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by digit1
Modified:
11 years, 8 months ago
Reviewers:
TomH, DerekS, caryclark1, reed1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Use the NDK's cpu-features library when building skia for Chromium/Android. This patch ensures that when Skia is built for Chromium, it will always use the Android NDK's cpu-features helper library to detect NEON at runtime. This is needed because sandboxed Chromium renderer processes cannot access /proc, and the probing performed in SkUtilsArm.cpp will never work. As such, the NEON code paths will never be used even when the device supports them. Chromium has special code that ensures that the browser process passes the CPU features flags to every renderer process, but Skia needs to use android_getCpuFeatures() to get them. See http://crbug.com/164154 for full details.

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -0 lines) Patch
M include/core/SkPreConfig.h View 1 chunk +6 lines, -0 lines 0 comments Download
M src/core/SkUtilsArm.cpp View 3 chunks +22 lines, -0 lines 5 comments Download

Messages

Total messages: 9
digit1
Hello, this is a small patch to enable NEON code-paths for Skia when run in ...
11 years, 8 months ago (2013-01-14 13:55:37 UTC) #1
caryclark1
lgtm
11 years, 8 months ago (2013-01-14 14:14:22 UTC) #2
DerekS
https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp File src/core/SkUtilsArm.cpp (right): https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp#newcode81 src/core/SkUtilsArm.cpp:81: result = (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; what is ...
11 years, 8 months ago (2013-01-14 14:20:52 UTC) #3
digit1
https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp File src/core/SkUtilsArm.cpp (right): https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp#newcode81 src/core/SkUtilsArm.cpp:81: result = (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; The downside ...
11 years, 8 months ago (2013-01-14 14:37:45 UTC) #4
DerekS
https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp File src/core/SkUtilsArm.cpp (right): https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp#newcode81 src/core/SkUtilsArm.cpp:81: result = (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; Ok. If ...
11 years, 8 months ago (2013-01-14 14:50:13 UTC) #5
digit1
https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp File src/core/SkUtilsArm.cpp (right): https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp#newcode81 src/core/SkUtilsArm.cpp:81: result = (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; I'll prepare ...
11 years, 8 months ago (2013-01-14 15:03:52 UTC) #6
DerekS
lgtm https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp File src/core/SkUtilsArm.cpp (right): https://codereview.appspot.com/7102045/diff/1/src/core/SkUtilsArm.cpp#newcode81 src/core/SkUtilsArm.cpp:81: result = (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; Understood. ...
11 years, 8 months ago (2013-01-14 15:05:58 UTC) #7
TomH
Were we not already getting NEON? Aargh! Glad you caught this, at least.
11 years, 8 months ago (2013-01-14 16:58:26 UTC) #8
digit1
11 years, 8 months ago (2013-01-24 10:11:21 UTC) #9
Closing this, as it's been submitted in 7149. Not sure why this doesn't appear
here.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b