Remove unecessary exported symbols from libhwui.so
Test: compiles and links
Bug: 150782769
Change-Id: Ib49c1bf914b6bfaad1fb29371115df7c9eec08d2
diff --git a/libs/hwui/AnimationContext.h b/libs/hwui/AnimationContext.h
index 74d5e79..f8a2072 100644
--- a/libs/hwui/AnimationContext.h
+++ b/libs/hwui/AnimationContext.h
@@ -77,8 +77,8 @@
PREVENT_COPY_AND_ASSIGN(AnimationContext);
public:
- ANDROID_API explicit AnimationContext(renderthread::TimeLord& clock);
- ANDROID_API virtual ~AnimationContext();
+ explicit AnimationContext(renderthread::TimeLord& clock);
+ virtual ~AnimationContext();
nsecs_t frameTimeMs() { return mFrameTimeMs; }
bool hasAnimations() {
@@ -87,22 +87,22 @@
// Will always add to the next frame list, which is swapped when
// startFrame() is called
- ANDROID_API void addAnimatingRenderNode(RenderNode& node);
+ void addAnimatingRenderNode(RenderNode& node);
// Marks the start of a frame, which will update the frame time and move all
// next frame animations into the current frame
- ANDROID_API virtual void startFrame(TreeInfo::TraversalMode mode);
+ virtual void startFrame(TreeInfo::TraversalMode mode);
// Runs any animations still left in mCurrentFrameAnimations that were not run
// as part of the standard RenderNode:prepareTree pass.
- ANDROID_API virtual void runRemainingAnimations(TreeInfo& info);
+ virtual void runRemainingAnimations(TreeInfo& info);
- ANDROID_API virtual void callOnFinished(BaseRenderNodeAnimator* animator,
+ virtual void callOnFinished(BaseRenderNodeAnimator* animator,
AnimationListener* listener);
- ANDROID_API virtual void destroy();
+ virtual void destroy();
- ANDROID_API virtual void pauseAnimators() {}
+ virtual void pauseAnimators() {}
private:
friend class AnimationHandle;
diff --git a/libs/hwui/Animator.h b/libs/hwui/Animator.h
index ed7b6eb..3c9f1ea 100644
--- a/libs/hwui/Animator.h
+++ b/libs/hwui/Animator.h
@@ -39,10 +39,10 @@
class AnimationListener : public VirtualLightRefBase {
public:
- ANDROID_API virtual void onAnimationFinished(BaseRenderNodeAnimator*) = 0;
+ virtual void onAnimationFinished(BaseRenderNodeAnimator*) = 0;
protected:
- ANDROID_API virtual ~AnimationListener() {}
+ virtual ~AnimationListener() {}
};
enum class RepeatMode {
@@ -55,34 +55,34 @@
PREVENT_COPY_AND_ASSIGN(BaseRenderNodeAnimator);
public:
- ANDROID_API void setStartValue(float value);
- ANDROID_API void setInterpolator(Interpolator* interpolator);
- ANDROID_API void setDuration(nsecs_t durationInMs);
- ANDROID_API nsecs_t duration() { return mDuration; }
- ANDROID_API void setStartDelay(nsecs_t startDelayInMs);
- ANDROID_API nsecs_t startDelay() { return mStartDelay; }
- ANDROID_API void setListener(AnimationListener* listener) { mListener = listener; }
+ void setStartValue(float value);
+ void setInterpolator(Interpolator* interpolator);
+ void setDuration(nsecs_t durationInMs);
+ nsecs_t duration() { return mDuration; }
+ void setStartDelay(nsecs_t startDelayInMs);
+ nsecs_t startDelay() { return mStartDelay; }
+ void setListener(AnimationListener* listener) { mListener = listener; }
AnimationListener* listener() { return mListener.get(); }
- ANDROID_API void setAllowRunningAsync(bool mayRunAsync) { mMayRunAsync = mayRunAsync; }
+ void setAllowRunningAsync(bool mayRunAsync) { mMayRunAsync = mayRunAsync; }
bool mayRunAsync() { return mMayRunAsync; }
- ANDROID_API void start();
- ANDROID_API virtual void reset();
- ANDROID_API void reverse();
+ void start();
+ virtual void reset();
+ void reverse();
// Terminates the animation at its current progress.
- ANDROID_API void cancel();
+ void cancel();
// Terminates the animation and skip to the end of the animation.
- ANDROID_API virtual void end();
+ virtual void end();
void attach(RenderNode* target);
virtual void onAttached() {}
void detach() { mTarget = nullptr; }
- ANDROID_API void pushStaging(AnimationContext& context);
- ANDROID_API bool animate(AnimationContext& context);
+ void pushStaging(AnimationContext& context);
+ bool animate(AnimationContext& context);
// Returns the remaining time in ms for the animation. Note this should only be called during
// an animation on RenderThread.
- ANDROID_API nsecs_t getRemainingPlayTime();
+ nsecs_t getRemainingPlayTime();
bool isRunning() {
return mPlayState == PlayState::Running || mPlayState == PlayState::Reversing;
@@ -90,7 +90,7 @@
bool isFinished() { return mPlayState == PlayState::Finished; }
float finalValue() { return mFinalValue; }
- ANDROID_API virtual uint32_t dirtyMask() = 0;
+ virtual uint32_t dirtyMask() = 0;
void forceEndNow(AnimationContext& context);
RenderNode* target() { return mTarget; }
@@ -196,9 +196,9 @@
ALPHA,
};
- ANDROID_API RenderPropertyAnimator(RenderProperty property, float finalValue);
+ RenderPropertyAnimator(RenderProperty property, float finalValue);
- ANDROID_API virtual uint32_t dirtyMask();
+ virtual uint32_t dirtyMask();
protected:
virtual float getValue(RenderNode* target) const override;
@@ -221,10 +221,10 @@
class CanvasPropertyPrimitiveAnimator : public BaseRenderNodeAnimator {
public:
- ANDROID_API CanvasPropertyPrimitiveAnimator(CanvasPropertyPrimitive* property,
+ CanvasPropertyPrimitiveAnimator(CanvasPropertyPrimitive* property,
float finalValue);
- ANDROID_API virtual uint32_t dirtyMask();
+ virtual uint32_t dirtyMask();
protected:
virtual float getValue(RenderNode* target) const override;
@@ -241,10 +241,10 @@
ALPHA,
};
- ANDROID_API CanvasPropertyPaintAnimator(CanvasPropertyPaint* property, PaintField field,
+ CanvasPropertyPaintAnimator(CanvasPropertyPaint* property, PaintField field,
float finalValue);
- ANDROID_API virtual uint32_t dirtyMask();
+ virtual uint32_t dirtyMask();
protected:
virtual float getValue(RenderNode* target) const override;
@@ -257,9 +257,9 @@
class RevealAnimator : public BaseRenderNodeAnimator {
public:
- ANDROID_API RevealAnimator(int centerX, int centerY, float startValue, float finalValue);
+ RevealAnimator(int centerX, int centerY, float startValue, float finalValue);
- ANDROID_API virtual uint32_t dirtyMask();
+ virtual uint32_t dirtyMask();
protected:
virtual float getValue(RenderNode* target) const override;
diff --git a/libs/hwui/AnimatorManager.h b/libs/hwui/AnimatorManager.h
index 9575391..a0df01d 100644
--- a/libs/hwui/AnimatorManager.h
+++ b/libs/hwui/AnimatorManager.h
@@ -54,7 +54,7 @@
void animateNoDamage(TreeInfo& info);
// Hard-ends all animators. May only be called on the UI thread.
- ANDROID_API void endAllStagingAnimators();
+ void endAllStagingAnimators();
// Hard-ends all animators that have been pushed. Used for cleanup if
// the ActivityContext is being destroyed
diff --git a/libs/hwui/DamageAccumulator.h b/libs/hwui/DamageAccumulator.h
index 030a20f..2faa9d0 100644
--- a/libs/hwui/DamageAccumulator.h
+++ b/libs/hwui/DamageAccumulator.h
@@ -58,7 +58,7 @@
// Returns the current dirty area, *NOT* transformed by pushed transforms
void peekAtDirty(SkRect* dest) const;
- ANDROID_API void computeCurrentTransform(Matrix4* outMatrix) const;
+ void computeCurrentTransform(Matrix4* outMatrix) const;
void finish(SkRect* totalDirty);
diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h
index c44c0d5..05f3774 100644
--- a/libs/hwui/DeferredLayerUpdater.h
+++ b/libs/hwui/DeferredLayerUpdater.h
@@ -44,11 +44,11 @@
public:
// Note that DeferredLayerUpdater assumes it is taking ownership of the layer
// and will not call incrementRef on it as a result.
- ANDROID_API explicit DeferredLayerUpdater(RenderState& renderState);
+ explicit DeferredLayerUpdater(RenderState& renderState);
- ANDROID_API ~DeferredLayerUpdater();
+ ~DeferredLayerUpdater();
- ANDROID_API bool setSize(int width, int height) {
+ bool setSize(int width, int height) {
if (mWidth != width || mHeight != height) {
mWidth = width;
mHeight = height;
@@ -60,7 +60,7 @@
int getWidth() { return mWidth; }
int getHeight() { return mHeight; }
- ANDROID_API bool setBlend(bool blend) {
+ bool setBlend(bool blend) {
if (blend != mBlend) {
mBlend = blend;
return true;
@@ -68,18 +68,18 @@
return false;
}
- ANDROID_API void setSurfaceTexture(AutoTextureRelease&& consumer);
+ void setSurfaceTexture(AutoTextureRelease&& consumer);
- ANDROID_API void updateTexImage() { mUpdateTexImage = true; }
+ void updateTexImage() { mUpdateTexImage = true; }
- ANDROID_API void setTransform(const SkMatrix* matrix) {
+ void setTransform(const SkMatrix* matrix) {
delete mTransform;
mTransform = matrix ? new SkMatrix(*matrix) : nullptr;
}
SkMatrix* getTransform() { return mTransform; }
- ANDROID_API void setPaint(const SkPaint* paint);
+ void setPaint(const SkPaint* paint);
void apply();
diff --git a/libs/hwui/FrameInfo.h b/libs/hwui/FrameInfo.h
index 51674fb..dc30617 100644
--- a/libs/hwui/FrameInfo.h
+++ b/libs/hwui/FrameInfo.h
@@ -69,7 +69,7 @@
};
};
-class ANDROID_API UiFrameInfoBuilder {
+class UiFrameInfoBuilder {
public:
explicit UiFrameInfoBuilder(int64_t* buffer) : mBuffer(buffer) {
memset(mBuffer, 0, UI_THREAD_FRAME_INFO_SIZE * sizeof(int64_t));
diff --git a/libs/hwui/HardwareBitmapUploader.h b/libs/hwui/HardwareBitmapUploader.h
index 72243d2..ad7a95a 100644
--- a/libs/hwui/HardwareBitmapUploader.h
+++ b/libs/hwui/HardwareBitmapUploader.h
@@ -20,7 +20,7 @@
namespace android::uirenderer {
-class ANDROID_API HardwareBitmapUploader {
+class HardwareBitmapUploader {
public:
static void initialize();
static void terminate();
diff --git a/libs/hwui/Interpolator.h b/libs/hwui/Interpolator.h
index 452988f..131cc39 100644
--- a/libs/hwui/Interpolator.h
+++ b/libs/hwui/Interpolator.h
@@ -37,12 +37,12 @@
Interpolator() {}
};
-class ANDROID_API AccelerateDecelerateInterpolator : public Interpolator {
+class AccelerateDecelerateInterpolator : public Interpolator {
public:
virtual float interpolate(float input) override;
};
-class ANDROID_API AccelerateInterpolator : public Interpolator {
+class AccelerateInterpolator : public Interpolator {
public:
explicit AccelerateInterpolator(float factor) : mFactor(factor), mDoubleFactor(factor * 2) {}
virtual float interpolate(float input) override;
@@ -52,7 +52,7 @@
const float mDoubleFactor;
};
-class ANDROID_API AnticipateInterpolator : public Interpolator {
+class AnticipateInterpolator : public Interpolator {
public:
explicit AnticipateInterpolator(float tension) : mTension(tension) {}
virtual float interpolate(float input) override;
@@ -61,7 +61,7 @@
const float mTension;
};
-class ANDROID_API AnticipateOvershootInterpolator : public Interpolator {
+class AnticipateOvershootInterpolator : public Interpolator {
public:
explicit AnticipateOvershootInterpolator(float tension) : mTension(tension) {}
virtual float interpolate(float input) override;
@@ -70,12 +70,12 @@
const float mTension;
};
-class ANDROID_API BounceInterpolator : public Interpolator {
+class BounceInterpolator : public Interpolator {
public:
virtual float interpolate(float input) override;
};
-class ANDROID_API CycleInterpolator : public Interpolator {
+class CycleInterpolator : public Interpolator {
public:
explicit CycleInterpolator(float cycles) : mCycles(cycles) {}
virtual float interpolate(float input) override;
@@ -84,7 +84,7 @@
const float mCycles;
};
-class ANDROID_API DecelerateInterpolator : public Interpolator {
+class DecelerateInterpolator : public Interpolator {
public:
explicit DecelerateInterpolator(float factor) : mFactor(factor) {}
virtual float interpolate(float input) override;
@@ -93,12 +93,12 @@
const float mFactor;
};
-class ANDROID_API LinearInterpolator : public Interpolator {
+class LinearInterpolator : public Interpolator {
public:
virtual float interpolate(float input) override { return input; }
};
-class ANDROID_API OvershootInterpolator : public Interpolator {
+class OvershootInterpolator : public Interpolator {
public:
explicit OvershootInterpolator(float tension) : mTension(tension) {}
virtual float interpolate(float input) override;
@@ -107,7 +107,7 @@
const float mTension;
};
-class ANDROID_API PathInterpolator : public Interpolator {
+class PathInterpolator : public Interpolator {
public:
explicit PathInterpolator(std::vector<float>&& x, std::vector<float>&& y) : mX(x), mY(y) {}
virtual float interpolate(float input) override;
@@ -117,7 +117,7 @@
std::vector<float> mY;
};
-class ANDROID_API LUTInterpolator : public Interpolator {
+class LUTInterpolator : public Interpolator {
public:
LUTInterpolator(float* values, size_t size);
~LUTInterpolator();
diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h
index 0c515a4..4c6e1a0a 100644
--- a/libs/hwui/Matrix.h
+++ b/libs/hwui/Matrix.h
@@ -44,7 +44,7 @@
// Classes
///////////////////////////////////////////////////////////////////////////////
-class ANDROID_API Matrix4 {
+class Matrix4 {
public:
float data[16];
diff --git a/libs/hwui/PathParser.h b/libs/hwui/PathParser.h
index f5bebce..3d5b64d 100644
--- a/libs/hwui/PathParser.h
+++ b/libs/hwui/PathParser.h
@@ -31,17 +31,17 @@
class PathParser {
public:
- struct ANDROID_API ParseResult {
+ struct ParseResult {
bool failureOccurred = false;
std::string failureMessage;
};
/**
* Parse the string literal and create a Skia Path. Return true on success.
*/
- ANDROID_API static void parseAsciiStringForSkPath(SkPath* outPath, ParseResult* result,
- const char* pathStr, size_t strLength);
- ANDROID_API static void getPathDataFromAsciiString(PathData* outData, ParseResult* result,
- const char* pathStr, size_t strLength);
+ static void parseAsciiStringForSkPath(SkPath* outPath, ParseResult* result,
+ const char* pathStr, size_t strLength);
+ static void getPathDataFromAsciiString(PathData* outData, ParseResult* result,
+ const char* pathStr, size_t strLength);
static void dump(const PathData& data);
static void validateVerbAndPoints(char verb, size_t points, ParseResult* result);
};
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index d3ecb54d..c8f6b3b 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -213,10 +213,10 @@
static int overrideSpotShadowStrength;
static ProfileType getProfileType();
- ANDROID_API static RenderPipelineType peekRenderPipelineType();
- ANDROID_API static RenderPipelineType getRenderPipelineType();
+ static RenderPipelineType peekRenderPipelineType();
+ static RenderPipelineType getRenderPipelineType();
- ANDROID_API static bool enableHighContrastText;
+ static bool enableHighContrastText;
// Should be used only by test apps
static bool waitForGpuCompletion;
@@ -235,17 +235,17 @@
static bool skpCaptureEnabled;
// For experimentation b/68769804
- ANDROID_API static bool enableRTAnimations;
+ static bool enableRTAnimations;
// Used for testing only to change the render pipeline.
static void overrideRenderPipelineType(RenderPipelineType);
static bool runningInEmulator;
- ANDROID_API static bool debuggingEnabled;
- ANDROID_API static bool isolatedProcess;
+ static bool debuggingEnabled;
+ static bool isolatedProcess;
- ANDROID_API static int contextPriority;
+ static int contextPriority;
static int defaultRenderAhead;
diff --git a/libs/hwui/PropertyValuesAnimatorSet.h b/libs/hwui/PropertyValuesAnimatorSet.h
index e4214b2..c04a0b9 100644
--- a/libs/hwui/PropertyValuesAnimatorSet.h
+++ b/libs/hwui/PropertyValuesAnimatorSet.h
@@ -44,7 +44,7 @@
};
// TODO: This class should really be named VectorDrawableAnimator
-class ANDROID_API PropertyValuesAnimatorSet : public BaseRenderNodeAnimator {
+class PropertyValuesAnimatorSet : public BaseRenderNodeAnimator {
public:
friend class PropertyAnimatorSetListener;
PropertyValuesAnimatorSet();
diff --git a/libs/hwui/PropertyValuesHolder.h b/libs/hwui/PropertyValuesHolder.h
index 0a799d3..bb26cbe 100644
--- a/libs/hwui/PropertyValuesHolder.h
+++ b/libs/hwui/PropertyValuesHolder.h
@@ -28,7 +28,7 @@
* When a fraction in [0f, 1f] is provided, the holder will calculate an interpolated value based
* on its start and end value, and set the new value on the VectorDrawble's corresponding property.
*/
-class ANDROID_API PropertyValuesHolder {
+class PropertyValuesHolder {
public:
virtual void setFraction(float fraction) = 0;
virtual ~PropertyValuesHolder() {}
@@ -49,19 +49,19 @@
}
};
-class ANDROID_API ColorEvaluator : public Evaluator<SkColor> {
+class ColorEvaluator : public Evaluator<SkColor> {
public:
virtual void evaluate(SkColor* outColor, const SkColor& from, const SkColor& to,
float fraction) const override;
};
-class ANDROID_API PathEvaluator : public Evaluator<PathData> {
+class PathEvaluator : public Evaluator<PathData> {
virtual void evaluate(PathData* out, const PathData& from, const PathData& to,
float fraction) const override;
};
template <typename T>
-class ANDROID_API PropertyValuesHolderImpl : public PropertyValuesHolder {
+class PropertyValuesHolderImpl : public PropertyValuesHolder {
public:
PropertyValuesHolderImpl(const T& startValue, const T& endValue)
: mStartValue(startValue), mEndValue(endValue) {}
@@ -85,7 +85,7 @@
T mEndValue;
};
-class ANDROID_API GroupPropertyValuesHolder : public PropertyValuesHolderImpl<float> {
+class GroupPropertyValuesHolder : public PropertyValuesHolderImpl<float> {
public:
GroupPropertyValuesHolder(VectorDrawable::Group* ptr, int propertyId, float startValue,
float endValue)
@@ -99,7 +99,7 @@
int mPropertyId;
};
-class ANDROID_API FullPathColorPropertyValuesHolder : public PropertyValuesHolderImpl<SkColor> {
+class FullPathColorPropertyValuesHolder : public PropertyValuesHolderImpl<SkColor> {
public:
FullPathColorPropertyValuesHolder(VectorDrawable::FullPath* ptr, int propertyId,
SkColor startValue, SkColor endValue)
@@ -116,7 +116,7 @@
int mPropertyId;
};
-class ANDROID_API FullPathPropertyValuesHolder : public PropertyValuesHolderImpl<float> {
+class FullPathPropertyValuesHolder : public PropertyValuesHolderImpl<float> {
public:
FullPathPropertyValuesHolder(VectorDrawable::FullPath* ptr, int propertyId, float startValue,
float endValue)
@@ -132,7 +132,7 @@
int mPropertyId;
};
-class ANDROID_API PathDataPropertyValuesHolder : public PropertyValuesHolderImpl<PathData> {
+class PathDataPropertyValuesHolder : public PropertyValuesHolderImpl<PathData> {
public:
PathDataPropertyValuesHolder(VectorDrawable::Path* ptr, PathData* startValue,
PathData* endValue)
@@ -146,7 +146,7 @@
PathData mPathData;
};
-class ANDROID_API RootAlphaPropertyValuesHolder : public PropertyValuesHolderImpl<float> {
+class RootAlphaPropertyValuesHolder : public PropertyValuesHolderImpl<float> {
public:
RootAlphaPropertyValuesHolder(VectorDrawable::Tree* tree, float startValue, float endValue)
: PropertyValuesHolderImpl(startValue, endValue), mTree(tree) {
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h
index d55e5b0..5877ae0 100644
--- a/libs/hwui/RenderNode.h
+++ b/libs/hwui/RenderNode.h
@@ -93,17 +93,17 @@
DISPLAY_LIST = 1 << 14,
};
- ANDROID_API RenderNode();
- ANDROID_API virtual ~RenderNode();
+ RenderNode();
+ virtual ~RenderNode();
// See flags defined in DisplayList.java
enum ReplayFlag { kReplayFlag_ClipChildren = 0x1 };
- ANDROID_API void setStagingDisplayList(DisplayList* newData);
+ void setStagingDisplayList(DisplayList* newData);
- ANDROID_API void output();
- ANDROID_API int getUsageSize();
- ANDROID_API int getAllocatedSize();
+ void output();
+ int getUsageSize();
+ int getAllocatedSize();
bool isRenderable() const { return mDisplayList && !mDisplayList->isEmpty(); }
@@ -148,12 +148,12 @@
int getHeight() const { return properties().getHeight(); }
- ANDROID_API virtual void prepareTree(TreeInfo& info);
+ virtual void prepareTree(TreeInfo& info);
void destroyHardwareResources(TreeInfo* info = nullptr);
void destroyLayers();
// UI thread only!
- ANDROID_API void addAnimator(const sp<BaseRenderNodeAnimator>& animator);
+ void addAnimator(const sp<BaseRenderNodeAnimator>& animator);
void removeAnimator(const sp<BaseRenderNodeAnimator>& animator);
// This can only happen during pushStaging()
@@ -178,7 +178,7 @@
// the frameNumber to appropriately batch/synchronize these transactions.
// There is no other filtering/batching to ensure that only the "final"
// state called once per frame.
- class ANDROID_API PositionListener : public VirtualLightRefBase {
+ class PositionListener : public VirtualLightRefBase {
public:
virtual ~PositionListener() {}
// Called when the RenderNode's position changes
@@ -189,14 +189,14 @@
virtual void onPositionLost(RenderNode& node, const TreeInfo* info) = 0;
};
- ANDROID_API void setPositionListener(PositionListener* listener) {
+ void setPositionListener(PositionListener* listener) {
mStagingPositionListener = listener;
mPositionListenerDirty = true;
}
// This is only modified in MODE_FULL, so it can be safely accessed
// on the UI thread.
- ANDROID_API bool hasParents() { return mParentCount; }
+ bool hasParents() { return mParentCount; }
void onRemovedFromTree(TreeInfo* info);
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h
index 24f6035..ef4cd1f 100644
--- a/libs/hwui/RenderProperties.h
+++ b/libs/hwui/RenderProperties.h
@@ -69,7 +69,7 @@
CLIP_TO_CLIP_BOUNDS = 0x1 << 1,
};
-class ANDROID_API LayerProperties {
+class LayerProperties {
public:
bool setType(LayerType type) {
if (RP_SET(mType, type)) {
@@ -123,7 +123,7 @@
/*
* Data structure that holds the properties for a RenderNode
*/
-class ANDROID_API RenderProperties {
+class RenderProperties {
public:
RenderProperties();
virtual ~RenderProperties();
diff --git a/libs/hwui/RootRenderNode.h b/libs/hwui/RootRenderNode.h
index 12de4ec..1d3f5a8 100644
--- a/libs/hwui/RootRenderNode.h
+++ b/libs/hwui/RootRenderNode.h
@@ -27,16 +27,16 @@
namespace android::uirenderer {
-class ANDROID_API RootRenderNode : public RenderNode {
+class RootRenderNode : public RenderNode {
public:
- ANDROID_API explicit RootRenderNode(std::unique_ptr<ErrorHandler> errorHandler)
+ explicit RootRenderNode(std::unique_ptr<ErrorHandler> errorHandler)
: RenderNode(), mErrorHandler(std::move(errorHandler)) {}
- ANDROID_API virtual ~RootRenderNode() {}
+ virtual ~RootRenderNode() {}
virtual void prepareTree(TreeInfo& info) override;
- ANDROID_API void attachAnimatingNode(RenderNode* animatingNode);
+ void attachAnimatingNode(RenderNode* animatingNode);
void attachPendingVectorDrawableAnimators();
@@ -53,9 +53,9 @@
void pushStagingVectorDrawableAnimators(AnimationContext* context);
- ANDROID_API void destroy();
+ void destroy();
- ANDROID_API void addVectorDrawableAnimator(PropertyValuesAnimatorSet* anim);
+ void addVectorDrawableAnimator(PropertyValuesAnimatorSet* anim);
private:
const std::unique_ptr<ErrorHandler> mErrorHandler;
@@ -75,12 +75,11 @@
};
#ifdef __ANDROID__ // Layoutlib does not support Animations
-class ANDROID_API ContextFactoryImpl : public IContextFactory {
+class ContextFactoryImpl : public IContextFactory {
public:
- ANDROID_API explicit ContextFactoryImpl(RootRenderNode* rootNode) : mRootNode(rootNode) {}
+ explicit ContextFactoryImpl(RootRenderNode* rootNode) : mRootNode(rootNode) {}
- ANDROID_API virtual AnimationContext* createAnimationContext(
- renderthread::TimeLord& clock) override;
+ virtual AnimationContext* createAnimationContext(renderthread::TimeLord& clock) override;
private:
RootRenderNode* mRootNode;
diff --git a/libs/hwui/VectorDrawable.h b/libs/hwui/VectorDrawable.h
index e1b6f2a..ac7d41e 100644
--- a/libs/hwui/VectorDrawable.h
+++ b/libs/hwui/VectorDrawable.h
@@ -97,7 +97,7 @@
bool* mStagingDirty;
};
-class ANDROID_API Node {
+class Node {
public:
class Properties {
public:
@@ -127,9 +127,9 @@
PropertyChangedListener* mPropertyChangedListener = nullptr;
};
-class ANDROID_API Path : public Node {
+class Path : public Node {
public:
- struct ANDROID_API Data {
+ struct Data {
std::vector<char> verbs;
std::vector<size_t> verbSizes;
std::vector<float> points;
@@ -200,7 +200,7 @@
bool mStagingPropertiesDirty = true;
};
-class ANDROID_API FullPath : public Path {
+class FullPath : public Path {
public:
class FullPathProperties : public Properties {
public:
@@ -369,7 +369,7 @@
bool mAntiAlias = true;
};
-class ANDROID_API ClipPath : public Path {
+class ClipPath : public Path {
public:
ClipPath(const ClipPath& path) : Path(path) {}
ClipPath(const char* path, size_t strLength) : Path(path, strLength) {}
@@ -378,7 +378,7 @@
virtual void setAntiAlias(bool aa) {}
};
-class ANDROID_API Group : public Node {
+class Group : public Node {
public:
class GroupProperties : public Properties {
public:
@@ -498,7 +498,7 @@
std::vector<std::unique_ptr<Node> > mChildren;
};
-class ANDROID_API Tree : public VirtualLightRefBase {
+class Tree : public VirtualLightRefBase {
public:
explicit Tree(Group* rootNode) : mRootNode(rootNode) {
mRootNode->setPropertyChangedListener(&mPropertyChangedListener);
diff --git a/libs/hwui/hwui/AnimatedImageDrawable.h b/libs/hwui/hwui/AnimatedImageDrawable.h
index f0aa35a..f81a5a4 100644
--- a/libs/hwui/hwui/AnimatedImageDrawable.h
+++ b/libs/hwui/hwui/AnimatedImageDrawable.h
@@ -44,7 +44,7 @@
* This class can be drawn into Canvas.h and maintains the state needed to drive
* the animation from the RenderThread.
*/
-class ANDROID_API AnimatedImageDrawable : public SkDrawable {
+class AnimatedImageDrawable : public SkDrawable {
public:
// bytesUsed includes the approximate sizes of the SkAnimatedImage and the SkPictures in the
// Snapshots.
diff --git a/libs/hwui/hwui/Bitmap.h b/libs/hwui/hwui/Bitmap.h
index b6e1536..37e60a0 100644
--- a/libs/hwui/hwui/Bitmap.h
+++ b/libs/hwui/hwui/Bitmap.h
@@ -56,7 +56,7 @@
typedef void (*FreeFunc)(void* addr, void* context);
-class ANDROID_API Bitmap : public SkPixelRef {
+class Bitmap : public SkPixelRef {
public:
/* The allocate factories not only construct the Bitmap object but also allocate the
* backing store whose type is determined by the specific method that is called.
diff --git a/libs/hwui/hwui/MinikinUtils.h b/libs/hwui/hwui/MinikinUtils.h
index cbf4095..0eacde9 100644
--- a/libs/hwui/hwui/MinikinUtils.h
+++ b/libs/hwui/hwui/MinikinUtils.h
@@ -39,30 +39,30 @@
class MinikinUtils {
public:
- ANDROID_API static minikin::MinikinPaint prepareMinikinPaint(const Paint* paint,
+ static minikin::MinikinPaint prepareMinikinPaint(const Paint* paint,
const Typeface* typeface);
- ANDROID_API static minikin::Layout doLayout(const Paint* paint, minikin::Bidi bidiFlags,
+ static minikin::Layout doLayout(const Paint* paint, minikin::Bidi bidiFlags,
const Typeface* typeface, const uint16_t* buf,
size_t bufSize, size_t start, size_t count,
size_t contextStart, size_t contextCount,
minikin::MeasuredText* mt);
- ANDROID_API static float measureText(const Paint* paint, minikin::Bidi bidiFlags,
+ static float measureText(const Paint* paint, minikin::Bidi bidiFlags,
const Typeface* typeface, const uint16_t* buf,
size_t start, size_t count, size_t bufSize,
float* advances);
- ANDROID_API static bool hasVariationSelector(const Typeface* typeface, uint32_t codepoint,
+ static bool hasVariationSelector(const Typeface* typeface, uint32_t codepoint,
uint32_t vs);
- ANDROID_API static float xOffsetForTextAlign(Paint* paint, const minikin::Layout& layout);
+ static float xOffsetForTextAlign(Paint* paint, const minikin::Layout& layout);
- ANDROID_API static float hOffsetForTextAlign(Paint* paint, const minikin::Layout& layout,
+ static float hOffsetForTextAlign(Paint* paint, const minikin::Layout& layout,
const SkPath& path);
// f is a functor of type void f(size_t start, size_t end);
template <typename F>
- ANDROID_API static void forFontRun(const minikin::Layout& layout, Paint* paint, F& f) {
+ static void forFontRun(const minikin::Layout& layout, Paint* paint, F& f) {
float saveSkewX = paint->getSkFont().getSkewX();
bool savefakeBold = paint->getSkFont().isEmbolden();
const minikin::MinikinFont* curFont = nullptr;
diff --git a/libs/hwui/hwui/Paint.h b/libs/hwui/hwui/Paint.h
index 281ecd2..e75e9e7 100644
--- a/libs/hwui/hwui/Paint.h
+++ b/libs/hwui/hwui/Paint.h
@@ -32,7 +32,7 @@
namespace android {
-class ANDROID_API Paint : public SkPaint {
+class Paint : public SkPaint {
public:
// Default values for underlined and strikethrough text,
// as defined by Skia in SkTextFormatParams.h.
diff --git a/libs/hwui/pipeline/skia/ShaderCache.h b/libs/hwui/pipeline/skia/ShaderCache.h
index 0898017..5b8e668 100644
--- a/libs/hwui/pipeline/skia/ShaderCache.h
+++ b/libs/hwui/pipeline/skia/ShaderCache.h
@@ -37,7 +37,7 @@
* "get" returns a pointer to the singleton ShaderCache object. This
* singleton object will never be destroyed.
*/
- ANDROID_API static ShaderCache& get();
+ static ShaderCache& get();
/**
* initShaderDiskCache" loads the serialized cache contents from disk,
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index 0f1b8ae..0306eec 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -170,9 +170,9 @@
}
// Used to queue up work that needs to be completed before this frame completes
- ANDROID_API void enqueueFrameWork(std::function<void()>&& func);
+ void enqueueFrameWork(std::function<void()>&& func);
- ANDROID_API int64_t getFrameNumber();
+ int64_t getFrameNumber();
void waitOnFences();
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h
index 3baeb2f..1b3dc15 100644
--- a/libs/hwui/renderthread/RenderProxy.h
+++ b/libs/hwui/renderthread/RenderProxy.h
@@ -60,69 +60,68 @@
* references RenderProxy fields. This is safe as RenderProxy cannot
* be deleted if it is blocked inside a call.
*/
-class ANDROID_API RenderProxy {
+class RenderProxy {
public:
- ANDROID_API RenderProxy(bool opaque, RenderNode* rootNode, IContextFactory* contextFactory);
- ANDROID_API virtual ~RenderProxy();
+ RenderProxy(bool opaque, RenderNode* rootNode, IContextFactory* contextFactory);
+ virtual ~RenderProxy();
// Won't take effect until next EGLSurface creation
- ANDROID_API void setSwapBehavior(SwapBehavior swapBehavior);
- ANDROID_API bool loadSystemProperties();
- ANDROID_API void setName(const char* name);
+ void setSwapBehavior(SwapBehavior swapBehavior);
+ bool loadSystemProperties();
+ void setName(const char* name);
- ANDROID_API void setSurface(ANativeWindow* window, bool enableTimeout = true);
- ANDROID_API void allocateBuffers();
- ANDROID_API bool pause();
- ANDROID_API void setStopped(bool stopped);
- ANDROID_API void setLightAlpha(uint8_t ambientShadowAlpha, uint8_t spotShadowAlpha);
- ANDROID_API void setLightGeometry(const Vector3& lightCenter, float lightRadius);
- ANDROID_API void setOpaque(bool opaque);
- ANDROID_API void setWideGamut(bool wideGamut);
- ANDROID_API int64_t* frameInfo();
- ANDROID_API int syncAndDrawFrame();
- ANDROID_API void destroy();
+ void setSurface(ANativeWindow* window, bool enableTimeout = true);
+ void allocateBuffers();
+ bool pause();
+ void setStopped(bool stopped);
+ void setLightAlpha(uint8_t ambientShadowAlpha, uint8_t spotShadowAlpha);
+ void setLightGeometry(const Vector3& lightCenter, float lightRadius);
+ void setOpaque(bool opaque);
+ void setWideGamut(bool wideGamut);
+ int64_t* frameInfo();
+ int syncAndDrawFrame();
+ void destroy();
- ANDROID_API static void invokeFunctor(Functor* functor, bool waitForCompletion);
+ static void invokeFunctor(Functor* functor, bool waitForCompletion);
static void destroyFunctor(int functor);
- ANDROID_API DeferredLayerUpdater* createTextureLayer();
- ANDROID_API void buildLayer(RenderNode* node);
- ANDROID_API bool copyLayerInto(DeferredLayerUpdater* layer, SkBitmap& bitmap);
- ANDROID_API void pushLayerUpdate(DeferredLayerUpdater* layer);
- ANDROID_API void cancelLayerUpdate(DeferredLayerUpdater* layer);
- ANDROID_API void detachSurfaceTexture(DeferredLayerUpdater* layer);
+ DeferredLayerUpdater* createTextureLayer();
+ void buildLayer(RenderNode* node);
+ bool copyLayerInto(DeferredLayerUpdater* layer, SkBitmap& bitmap);
+ void pushLayerUpdate(DeferredLayerUpdater* layer);
+ void cancelLayerUpdate(DeferredLayerUpdater* layer);
+ void detachSurfaceTexture(DeferredLayerUpdater* layer);
- ANDROID_API void destroyHardwareResources();
- ANDROID_API static void trimMemory(int level);
- ANDROID_API static void overrideProperty(const char* name, const char* value);
+ void destroyHardwareResources();
+ static void trimMemory(int level);
+ static void overrideProperty(const char* name, const char* value);
- ANDROID_API void fence();
- ANDROID_API static int maxTextureSize();
- ANDROID_API void stopDrawing();
- ANDROID_API void notifyFramePending();
+ void fence();
+ static int maxTextureSize();
+ void stopDrawing();
+ void notifyFramePending();
- ANDROID_API void dumpProfileInfo(int fd, int dumpFlags);
+ void dumpProfileInfo(int fd, int dumpFlags);
// Not exported, only used for testing
void resetProfileInfo();
uint32_t frameTimePercentile(int p);
- ANDROID_API static void dumpGraphicsMemory(int fd);
+ static void dumpGraphicsMemory(int fd);
- ANDROID_API static void rotateProcessStatsBuffer();
- ANDROID_API static void setProcessStatsBuffer(int fd);
- ANDROID_API int getRenderThreadTid();
+ static void rotateProcessStatsBuffer();
+ static void setProcessStatsBuffer(int fd);
+ int getRenderThreadTid();
- ANDROID_API void addRenderNode(RenderNode* node, bool placeFront);
- ANDROID_API void removeRenderNode(RenderNode* node);
- ANDROID_API void drawRenderNode(RenderNode* node);
- ANDROID_API void setContentDrawBounds(int left, int top, int right, int bottom);
- ANDROID_API void setPictureCapturedCallback(
- const std::function<void(sk_sp<SkPicture>&&)>& callback);
- ANDROID_API void setFrameCallback(std::function<void(int64_t)>&& callback);
- ANDROID_API void setFrameCompleteCallback(std::function<void(int64_t)>&& callback);
+ void addRenderNode(RenderNode* node, bool placeFront);
+ void removeRenderNode(RenderNode* node);
+ void drawRenderNode(RenderNode* node);
+ void setContentDrawBounds(int left, int top, int right, int bottom);
+ void setPictureCapturedCallback(const std::function<void(sk_sp<SkPicture>&&)>& callback);
+ void setFrameCallback(std::function<void(int64_t)>&& callback);
+ void setFrameCompleteCallback(std::function<void(int64_t)>&& callback);
- ANDROID_API void addFrameMetricsObserver(FrameMetricsObserver* observer);
- ANDROID_API void removeFrameMetricsObserver(FrameMetricsObserver* observer);
- ANDROID_API void setForceDark(bool enable);
+ void addFrameMetricsObserver(FrameMetricsObserver* observer);
+ void removeFrameMetricsObserver(FrameMetricsObserver* observer);
+ void setForceDark(bool enable);
/**
* Sets a render-ahead depth on the backing renderer. This will increase latency by
@@ -139,17 +138,17 @@
*
* @param renderAhead How far to render ahead, must be in the range [0..2]
*/
- ANDROID_API void setRenderAheadDepth(int renderAhead);
+ void setRenderAheadDepth(int renderAhead);
- ANDROID_API static int copySurfaceInto(ANativeWindow* window, int left, int top, int right,
+ static int copySurfaceInto(ANativeWindow* window, int left, int top, int right,
int bottom, SkBitmap* bitmap);
- ANDROID_API static void prepareToDraw(Bitmap& bitmap);
+ static void prepareToDraw(Bitmap& bitmap);
static int copyHWBitmapInto(Bitmap* hwBitmap, SkBitmap* bitmap);
- ANDROID_API static void disableVsync();
+ static void disableVsync();
- ANDROID_API static void preload();
+ static void preload();
private:
RenderThread& mRenderThread;
diff --git a/libs/hwui/renderthread/RenderTask.h b/libs/hwui/renderthread/RenderTask.h
index c56a357..3e3a381 100644
--- a/libs/hwui/renderthread/RenderTask.h
+++ b/libs/hwui/renderthread/RenderTask.h
@@ -45,12 +45,12 @@
* malloc/free churn of small objects?
*/
-class ANDROID_API RenderTask {
+class RenderTask {
public:
- ANDROID_API RenderTask() : mNext(nullptr), mRunAt(0) {}
- ANDROID_API virtual ~RenderTask() {}
+ RenderTask() : mNext(nullptr), mRunAt(0) {}
+ virtual ~RenderTask() {}
- ANDROID_API virtual void run() = 0;
+ virtual void run() = 0;
RenderTask* mNext;
nsecs_t mRunAt; // nano-seconds on the SYSTEM_TIME_MONOTONIC clock
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h
index 8be46a6..2c295bc 100644
--- a/libs/hwui/renderthread/RenderThread.h
+++ b/libs/hwui/renderthread/RenderThread.h
@@ -88,7 +88,7 @@
public:
// Sets a callback that fires before any RenderThread setup has occurred.
- ANDROID_API static void setOnStartHook(JVMAttachHook onStartHook);
+ static void setOnStartHook(JVMAttachHook onStartHook);
static JVMAttachHook getOnStartHook();
WorkQueue& queue() { return ThreadBase::queue(); }
diff --git a/libs/hwui/service/GraphicsStatsService.h b/libs/hwui/service/GraphicsStatsService.h
index 59e21d0..4063f74 100644
--- a/libs/hwui/service/GraphicsStatsService.h
+++ b/libs/hwui/service/GraphicsStatsService.h
@@ -44,18 +44,16 @@
ProtobufStatsd,
};
- ANDROID_API static void saveBuffer(const std::string& path, const std::string& package,
- int64_t versionCode, int64_t startTime, int64_t endTime,
- const ProfileData* data);
+ static void saveBuffer(const std::string& path, const std::string& package, int64_t versionCode,
+ int64_t startTime, int64_t endTime, const ProfileData* data);
- ANDROID_API static Dump* createDump(int outFd, DumpType type);
- ANDROID_API static void addToDump(Dump* dump, const std::string& path,
- const std::string& package, int64_t versionCode,
- int64_t startTime, int64_t endTime, const ProfileData* data);
- ANDROID_API static void addToDump(Dump* dump, const std::string& path);
- ANDROID_API static void finishDump(Dump* dump);
- ANDROID_API static void finishDumpInMemory(Dump* dump, AStatsEventList* data,
- bool lastFullDay);
+ static Dump* createDump(int outFd, DumpType type);
+ static void addToDump(Dump* dump, const std::string& path, const std::string& package,
+ int64_t versionCode, int64_t startTime, int64_t endTime,
+ const ProfileData* data);
+ static void addToDump(Dump* dump, const std::string& path);
+ static void finishDump(Dump* dump);
+ static void finishDumpInMemory(Dump* dump, AStatsEventList* data, bool lastFullDay);
// Visible for testing
static bool parseFromFile(const std::string& path, protos::GraphicsStatsProto* output);
diff --git a/libs/hwui/utils/Blur.h b/libs/hwui/utils/Blur.h
index d6b41b8..6b822f0 100644
--- a/libs/hwui/utils/Blur.h
+++ b/libs/hwui/utils/Blur.h
@@ -26,9 +26,9 @@
class Blur {
public:
// If radius > 0, return the corresponding sigma, else return 0
- ANDROID_API static float convertRadiusToSigma(float radius);
+ static float convertRadiusToSigma(float radius);
// If sigma > 0.5, return the corresponding radius, else return 0
- ANDROID_API static float convertSigmaToRadius(float sigma);
+ static float convertSigmaToRadius(float sigma);
// If the original radius was on an integer boundary then after the sigma to
// radius conversion a small rounding error may be introduced. This function
// accounts for that error and snaps to the appropriate integer boundary.
diff --git a/libs/hwui/utils/Color.h b/libs/hwui/utils/Color.h
index a29b285..71ed683 100644
--- a/libs/hwui/utils/Color.h
+++ b/libs/hwui/utils/Color.h
@@ -91,7 +91,7 @@
}
#ifdef __ANDROID__ // Layoutlib does not support hardware buffers or native windows
-ANDROID_API SkImageInfo ANativeWindowToImageInfo(const ANativeWindow_Buffer& buffer,
+SkImageInfo ANativeWindowToImageInfo(const ANativeWindow_Buffer& buffer,
sk_sp<SkColorSpace> colorSpace);
SkImageInfo BufferDescriptionToImageInfo(const AHardwareBuffer_Desc& bufferDesc,
diff --git a/libs/hwui/utils/VectorDrawableUtils.h b/libs/hwui/utils/VectorDrawableUtils.h
index 4be48fb..4f63959 100644
--- a/libs/hwui/utils/VectorDrawableUtils.h
+++ b/libs/hwui/utils/VectorDrawableUtils.h
@@ -28,10 +28,10 @@
class VectorDrawableUtils {
public:
- ANDROID_API static bool canMorph(const PathData& morphFrom, const PathData& morphTo);
- ANDROID_API static bool interpolatePathData(PathData* outData, const PathData& morphFrom,
+ static bool canMorph(const PathData& morphFrom, const PathData& morphTo);
+ static bool interpolatePathData(PathData* outData, const PathData& morphFrom,
const PathData& morphTo, float fraction);
- ANDROID_API static void verbsToPath(SkPath* outPath, const PathData& data);
+ static void verbsToPath(SkPath* outPath, const PathData& data);
static void interpolatePaths(PathData* outPathData, const PathData& from, const PathData& to,
float fraction);
};