summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/hwui/AnimationContext.h4
-rw-r--r--libs/hwui/AnimatorManager.h2
-rw-r--r--libs/hwui/Caches.h2
-rw-r--r--libs/hwui/CanvasProperty.h4
-rw-r--r--libs/hwui/CanvasState.h2
-rw-r--r--libs/hwui/DeferredDisplayList.h2
-rw-r--r--libs/hwui/Dither.h2
-rw-r--r--libs/hwui/FrameInfo.h2
-rw-r--r--libs/hwui/FrameInfoVisualizer.h2
-rw-r--r--libs/hwui/GradientCache.h2
-rw-r--r--libs/hwui/JankTracker.h2
-rw-r--r--libs/hwui/LayerCache.h2
-rw-r--r--libs/hwui/Matrix.h4
-rw-r--r--[-rwxr-xr-x]libs/hwui/OpenGLRenderer.h2
-rw-r--r--libs/hwui/PatchCache.h2
-rw-r--r--libs/hwui/PathCache.h2
-rw-r--r--libs/hwui/ProgramCache.h2
-rw-r--r--libs/hwui/Rect.h2
-rw-r--r--libs/hwui/RenderBufferCache.h2
-rw-r--r--libs/hwui/ResourceCache.h2
-rw-r--r--libs/hwui/SkiaCanvasProxy.h2
-rw-r--r--libs/hwui/TextDropShadowCache.h4
-rw-r--r--libs/hwui/Texture.h4
-rw-r--r--libs/hwui/renderthread/RenderTask.h2
-rw-r--r--libs/hwui/thread/Barrier.h2
-rw-r--r--libs/hwui/thread/Future.h2
-rw-r--r--libs/hwui/thread/Signal.h2
-rw-r--r--libs/hwui/thread/TaskManager.h2
-rw-r--r--libs/hwui/thread/TaskProcessor.h2
-rw-r--r--libs/hwui/utils/SortedListImpl.h2
30 files changed, 35 insertions, 35 deletions
diff --git a/libs/hwui/AnimationContext.h b/libs/hwui/AnimationContext.h
index 909ed36a2127..395dc73cfdf0 100644
--- a/libs/hwui/AnimationContext.h
+++ b/libs/hwui/AnimationContext.h
@@ -57,7 +57,7 @@ public:
private:
friend class AnimationContext;
- AnimationHandle(AnimationContext& context);
+ explicit AnimationHandle(AnimationContext& context);
AnimationHandle(RenderNode& animatingNode, AnimationContext& context);
~AnimationHandle();
@@ -75,7 +75,7 @@ private:
class AnimationContext {
PREVENT_COPY_AND_ASSIGN(AnimationContext);
public:
- ANDROID_API AnimationContext(renderthread::TimeLord& clock);
+ ANDROID_API explicit AnimationContext(renderthread::TimeLord& clock);
ANDROID_API virtual ~AnimationContext();
nsecs_t frameTimeMs() { return mFrameTimeMs; }
diff --git a/libs/hwui/AnimatorManager.h b/libs/hwui/AnimatorManager.h
index fb75eb8599b4..96ff07aa3090 100644
--- a/libs/hwui/AnimatorManager.h
+++ b/libs/hwui/AnimatorManager.h
@@ -35,7 +35,7 @@ class TreeInfo;
class AnimatorManager {
PREVENT_COPY_AND_ASSIGN(AnimatorManager);
public:
- AnimatorManager(RenderNode& parent);
+ explicit AnimatorManager(RenderNode& parent);
~AnimatorManager();
void addAnimator(const sp<BaseRenderNodeAnimator>& animator);
diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h
index 804f609e9a0f..e76df40e4447 100644
--- a/libs/hwui/Caches.h
+++ b/libs/hwui/Caches.h
@@ -83,7 +83,7 @@ public:
return sInstance != nullptr;
}
private:
- Caches(RenderState& renderState);
+ explicit Caches(RenderState& renderState);
static Caches* sInstance;
public:
diff --git a/libs/hwui/CanvasProperty.h b/libs/hwui/CanvasProperty.h
index 6074394d0720..56671bba654b 100644
--- a/libs/hwui/CanvasProperty.h
+++ b/libs/hwui/CanvasProperty.h
@@ -28,7 +28,7 @@ namespace uirenderer {
class CanvasPropertyPrimitive : public VirtualLightRefBase {
PREVENT_COPY_AND_ASSIGN(CanvasPropertyPrimitive);
public:
- CanvasPropertyPrimitive(float initialValue) : value(initialValue) {}
+ explicit CanvasPropertyPrimitive(float initialValue) : value(initialValue) {}
float value;
};
@@ -36,7 +36,7 @@ public:
class CanvasPropertyPaint : public VirtualLightRefBase {
PREVENT_COPY_AND_ASSIGN(CanvasPropertyPaint);
public:
- CanvasPropertyPaint(const SkPaint& initialValue) : value(initialValue) {}
+ explicit CanvasPropertyPaint(const SkPaint& initialValue) : value(initialValue) {}
SkPaint value;
};
diff --git a/libs/hwui/CanvasState.h b/libs/hwui/CanvasState.h
index b35db28eaf82..4653d6dfdf15 100644
--- a/libs/hwui/CanvasState.h
+++ b/libs/hwui/CanvasState.h
@@ -73,7 +73,7 @@ public:
class ANDROID_API CanvasState {
public:
- CanvasState(CanvasStateClient& renderer);
+ explicit CanvasState(CanvasStateClient& renderer);
~CanvasState();
/**
diff --git a/libs/hwui/DeferredDisplayList.h b/libs/hwui/DeferredDisplayList.h
index 3bc4904d6921..b215860268b3 100644
--- a/libs/hwui/DeferredDisplayList.h
+++ b/libs/hwui/DeferredDisplayList.h
@@ -82,7 +82,7 @@ public:
class DeferredDisplayList {
friend struct DeferStateStruct; // used to give access to allocator
public:
- DeferredDisplayList(const Rect& bounds, bool avoidOverdraw = true) :
+ explicit DeferredDisplayList(const Rect& bounds, bool avoidOverdraw = true) :
mBounds(bounds), mAvoidOverdraw(avoidOverdraw) {
clear();
}
diff --git a/libs/hwui/Dither.h b/libs/hwui/Dither.h
index b589b80496f0..6af3e8384472 100644
--- a/libs/hwui/Dither.h
+++ b/libs/hwui/Dither.h
@@ -37,7 +37,7 @@ class Program;
*/
class Dither {
public:
- Dither(Caches& caches);
+ explicit Dither(Caches& caches);
void clear();
void setupProgram(Program& program, GLuint* textureUnit);
diff --git a/libs/hwui/FrameInfo.h b/libs/hwui/FrameInfo.h
index f8013ab6b6c4..b2eaf13cacf7 100644
--- a/libs/hwui/FrameInfo.h
+++ b/libs/hwui/FrameInfo.h
@@ -65,7 +65,7 @@ namespace FrameInfoFlags {
class ANDROID_API UiFrameInfoBuilder {
public:
- UiFrameInfoBuilder(int64_t* buffer) : mBuffer(buffer) {
+ explicit UiFrameInfoBuilder(int64_t* buffer) : mBuffer(buffer) {
memset(mBuffer, 0, UI_THREAD_FRAME_INFO_SIZE * sizeof(int64_t));
}
diff --git a/libs/hwui/FrameInfoVisualizer.h b/libs/hwui/FrameInfoVisualizer.h
index cf877c4d8827..2fd15ebb3091 100644
--- a/libs/hwui/FrameInfoVisualizer.h
+++ b/libs/hwui/FrameInfoVisualizer.h
@@ -39,7 +39,7 @@ typedef RingBuffer<FrameInfo, 120> FrameInfoSource;
class FrameInfoVisualizer {
public:
- FrameInfoVisualizer(FrameInfoSource& source);
+ explicit FrameInfoVisualizer(FrameInfoSource& source);
~FrameInfoVisualizer();
bool consumeProperties();
diff --git a/libs/hwui/GradientCache.h b/libs/hwui/GradientCache.h
index 08319ea1ec9b..54df9bf071b8 100644
--- a/libs/hwui/GradientCache.h
+++ b/libs/hwui/GradientCache.h
@@ -104,7 +104,7 @@ inline hash_t hash_type(const GradientCacheEntry& entry) {
*/
class GradientCache: public OnEntryRemoved<GradientCacheEntry, Texture*> {
public:
- GradientCache(Extensions& extensions);
+ explicit GradientCache(Extensions& extensions);
~GradientCache();
/**
diff --git a/libs/hwui/JankTracker.h b/libs/hwui/JankTracker.h
index 3887e5e65d60..a41300503c71 100644
--- a/libs/hwui/JankTracker.h
+++ b/libs/hwui/JankTracker.h
@@ -54,7 +54,7 @@ struct ProfileData {
// TODO: Replace DrawProfiler with this
class JankTracker {
public:
- JankTracker(nsecs_t frameIntervalNanos);
+ explicit JankTracker(nsecs_t frameIntervalNanos);
~JankTracker();
void addFrame(const FrameInfo& frame);
diff --git a/libs/hwui/LayerCache.h b/libs/hwui/LayerCache.h
index 7d17b9ba41aa..94babf4d5794 100644
--- a/libs/hwui/LayerCache.h
+++ b/libs/hwui/LayerCache.h
@@ -104,7 +104,7 @@ private:
mHeight = Layer::computeIdealHeight(layerHeight);
}
- LayerEntry(Layer* layer):
+ explicit LayerEntry(Layer* layer):
mLayer(layer), mWidth(layer->getWidth()), mHeight(layer->getHeight()) {
}
diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h
index ed54a25f3edf..3f0777d1b99f 100644
--- a/libs/hwui/Matrix.h
+++ b/libs/hwui/Matrix.h
@@ -81,11 +81,11 @@ public:
loadIdentity();
}
- Matrix4(const float* v) {
+ explicit Matrix4(const float* v) {
load(v);
}
- Matrix4(const SkMatrix& v) {
+ Matrix4(const SkMatrix& v) { // NOLINT, implicit
load(v);
}
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 402f6edd475d..2acbdc383e67 100755..100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -114,7 +114,7 @@ enum ModelViewMode {
*/
class OpenGLRenderer : public CanvasStateClient {
public:
- OpenGLRenderer(RenderState& renderState);
+ explicit OpenGLRenderer(RenderState& renderState);
virtual ~OpenGLRenderer();
/**
diff --git a/libs/hwui/PatchCache.h b/libs/hwui/PatchCache.h
index 387f79acf0ec..b9eda441dc78 100644
--- a/libs/hwui/PatchCache.h
+++ b/libs/hwui/PatchCache.h
@@ -51,7 +51,7 @@ class Caches;
class PatchCache {
public:
- PatchCache(RenderState& renderState);
+ explicit PatchCache(RenderState& renderState);
~PatchCache();
void init();
diff --git a/libs/hwui/PathCache.h b/libs/hwui/PathCache.h
index c529915988d9..86c59b532b28 100644
--- a/libs/hwui/PathCache.h
+++ b/libs/hwui/PathCache.h
@@ -290,7 +290,7 @@ private:
class PathProcessor: public TaskProcessor<SkBitmap*> {
public:
- PathProcessor(Caches& caches);
+ explicit PathProcessor(Caches& caches);
~PathProcessor() { }
virtual void onProcess(const sp<Task<SkBitmap*> >& task) override;
diff --git a/libs/hwui/ProgramCache.h b/libs/hwui/ProgramCache.h
index 1dadda1a4c83..9ac885b665e7 100644
--- a/libs/hwui/ProgramCache.h
+++ b/libs/hwui/ProgramCache.h
@@ -40,7 +40,7 @@ namespace uirenderer {
*/
class ProgramCache {
public:
- ProgramCache(Extensions& extensions);
+ explicit ProgramCache(Extensions& extensions);
~ProgramCache();
Program* get(const ProgramDescription& description);
diff --git a/libs/hwui/Rect.h b/libs/hwui/Rect.h
index 4c4cd3da3be4..7f37b4fe39e8 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -72,7 +72,7 @@ public:
bottom(height) {
}
- inline Rect(const SkRect& rect):
+ inline Rect(const SkRect& rect): // NOLINT, implicit
left(rect.fLeft),
top(rect.fTop),
right(rect.fRight),
diff --git a/libs/hwui/RenderBufferCache.h b/libs/hwui/RenderBufferCache.h
index 6c668b09c40d..c8b4bc395ffb 100644
--- a/libs/hwui/RenderBufferCache.h
+++ b/libs/hwui/RenderBufferCache.h
@@ -85,7 +85,7 @@ private:
mBuffer(nullptr), mFormat(format), mWidth(width), mHeight(height) {
}
- RenderBufferEntry(RenderBuffer* buffer):
+ explicit RenderBufferEntry(RenderBuffer* buffer):
mBuffer(buffer), mFormat(buffer->getFormat()),
mWidth(buffer->getWidth()), mHeight(buffer->getHeight()) {
}
diff --git a/libs/hwui/ResourceCache.h b/libs/hwui/ResourceCache.h
index 4583c8de87e8..3ac78642c7ee 100644
--- a/libs/hwui/ResourceCache.h
+++ b/libs/hwui/ResourceCache.h
@@ -42,7 +42,7 @@ enum ResourceType {
class ResourceReference {
public:
- ResourceReference(ResourceType type) {
+ explicit ResourceReference(ResourceType type) {
refCount = 0; destroyed = false; resourceType = type;
}
diff --git a/libs/hwui/SkiaCanvasProxy.h b/libs/hwui/SkiaCanvasProxy.h
index 0de965094e64..d8d3497ce0b4 100644
--- a/libs/hwui/SkiaCanvasProxy.h
+++ b/libs/hwui/SkiaCanvasProxy.h
@@ -39,7 +39,7 @@ namespace uirenderer {
*/
class ANDROID_API SkiaCanvasProxy : public SkCanvas {
public:
- SkiaCanvasProxy(Canvas* canvas, bool filterHwuiCalls = false);
+ explicit SkiaCanvasProxy(Canvas* canvas, bool filterHwuiCalls = false);
virtual ~SkiaCanvasProxy() {}
protected:
diff --git a/libs/hwui/TextDropShadowCache.h b/libs/hwui/TextDropShadowCache.h
index caf089f6d2a5..1cc10a06feff 100644
--- a/libs/hwui/TextDropShadowCache.h
+++ b/libs/hwui/TextDropShadowCache.h
@@ -117,7 +117,7 @@ inline hash_t hash_type(const ShadowText& entry) {
* Alpha texture used to represent a shadow.
*/
struct ShadowTexture: public Texture {
- ShadowTexture(Caches& caches): Texture(caches) {
+ explicit ShadowTexture(Caches& caches): Texture(caches) {
}
float left;
@@ -127,7 +127,7 @@ struct ShadowTexture: public Texture {
class TextDropShadowCache: public OnEntryRemoved<ShadowText, ShadowTexture*> {
public:
TextDropShadowCache();
- TextDropShadowCache(uint32_t maxByteSize);
+ explicit TextDropShadowCache(uint32_t maxByteSize);
~TextDropShadowCache();
/**
diff --git a/libs/hwui/Texture.h b/libs/hwui/Texture.h
index 4bcd96dd32f7..3aac3740ff68 100644
--- a/libs/hwui/Texture.h
+++ b/libs/hwui/Texture.h
@@ -30,7 +30,7 @@ class UvMapper;
*/
class Texture {
public:
- Texture(Caches& caches) : mCaches(caches) { }
+ explicit Texture(Caches& caches) : mCaches(caches) { }
virtual ~Texture() { }
@@ -120,7 +120,7 @@ private:
class AutoTexture {
public:
- AutoTexture(const Texture* texture): mTexture(texture) { }
+ explicit AutoTexture(const Texture* texture): mTexture(texture) { }
~AutoTexture() {
if (mTexture && mTexture->cleanup) {
mTexture->deleteTexture();
diff --git a/libs/hwui/renderthread/RenderTask.h b/libs/hwui/renderthread/RenderTask.h
index 89c3a7d08a62..9ea671be5b86 100644
--- a/libs/hwui/renderthread/RenderTask.h
+++ b/libs/hwui/renderthread/RenderTask.h
@@ -73,7 +73,7 @@ typedef void* (*RunnableMethod)(void* data);
class MethodInvokeRenderTask : public RenderTask {
public:
- MethodInvokeRenderTask(RunnableMethod method)
+ explicit MethodInvokeRenderTask(RunnableMethod method)
: mMethod(method), mReturnPtr(nullptr) {}
void* payload() { return mData; }
diff --git a/libs/hwui/thread/Barrier.h b/libs/hwui/thread/Barrier.h
index 6cb23e54943b..bf107042c5cf 100644
--- a/libs/hwui/thread/Barrier.h
+++ b/libs/hwui/thread/Barrier.h
@@ -24,7 +24,7 @@ namespace uirenderer {
class Barrier {
public:
- Barrier(Condition::WakeUpType type = Condition::WAKE_UP_ALL) : mType(type), mOpened(false) { }
+ explicit Barrier(Condition::WakeUpType type = Condition::WAKE_UP_ALL) : mType(type), mOpened(false) { }
~Barrier() { }
void open() {
diff --git a/libs/hwui/thread/Future.h b/libs/hwui/thread/Future.h
index a3ff3bcc3698..177eebd9b85f 100644
--- a/libs/hwui/thread/Future.h
+++ b/libs/hwui/thread/Future.h
@@ -27,7 +27,7 @@ namespace uirenderer {
template<typename T>
class Future: public LightRefBase<Future<T> > {
public:
- Future(Condition::WakeUpType type = Condition::WAKE_UP_ONE): mBarrier(type), mResult() { }
+ explicit Future(Condition::WakeUpType type = Condition::WAKE_UP_ONE): mBarrier(type), mResult() { }
~Future() { }
/**
diff --git a/libs/hwui/thread/Signal.h b/libs/hwui/thread/Signal.h
index d4cfeeb29c17..93e6f4c27535 100644
--- a/libs/hwui/thread/Signal.h
+++ b/libs/hwui/thread/Signal.h
@@ -26,7 +26,7 @@ namespace uirenderer {
class Signal {
public:
- Signal(Condition::WakeUpType type = Condition::WAKE_UP_ALL) : mType(type), mSignaled(false) { }
+ explicit Signal(Condition::WakeUpType type = Condition::WAKE_UP_ALL) : mType(type), mSignaled(false) { }
~Signal() { }
void signal() {
diff --git a/libs/hwui/thread/TaskManager.h b/libs/hwui/thread/TaskManager.h
index 10e8b9e0bead..4d3b8f07b548 100644
--- a/libs/hwui/thread/TaskManager.h
+++ b/libs/hwui/thread/TaskManager.h
@@ -77,7 +77,7 @@ private:
class WorkerThread: public Thread {
public:
- WorkerThread(const String8 name): mSignal(Condition::WAKE_UP_ONE), mName(name) { }
+ explicit WorkerThread(const String8 name): mSignal(Condition::WAKE_UP_ONE), mName(name) { }
bool addTask(TaskWrapper task);
size_t getTaskCount() const;
diff --git a/libs/hwui/thread/TaskProcessor.h b/libs/hwui/thread/TaskProcessor.h
index 82538e9c7342..58674505c457 100644
--- a/libs/hwui/thread/TaskProcessor.h
+++ b/libs/hwui/thread/TaskProcessor.h
@@ -36,7 +36,7 @@ public:
template<typename T>
class TaskProcessor: public TaskProcessorBase {
public:
- TaskProcessor(TaskManager* manager): mManager(manager) { }
+ explicit TaskProcessor(TaskManager* manager): mManager(manager) { }
virtual ~TaskProcessor() { }
void add(const sp<Task<T> >& task) {
diff --git a/libs/hwui/utils/SortedListImpl.h b/libs/hwui/utils/SortedListImpl.h
index b1018265566a..5abeef555eeb 100644
--- a/libs/hwui/utils/SortedListImpl.h
+++ b/libs/hwui/utils/SortedListImpl.h
@@ -25,7 +25,7 @@ namespace uirenderer {
class SortedListImpl: public VectorImpl {
public:
SortedListImpl(size_t itemSize, uint32_t flags);
- SortedListImpl(const VectorImpl& rhs);
+ explicit SortedListImpl(const VectorImpl& rhs);
virtual ~SortedListImpl();
SortedListImpl& operator =(const SortedListImpl& rhs);