resolve merge conflicts of 5152fd9 to stage-aosp-master
Change-Id: I2066125eb4076dbc9e8996bb1fa87735aa6040d3
diff --git a/libs/hwui/AnimationContext.h b/libs/hwui/AnimationContext.h
index 909ed36..395dc73 100644
--- a/libs/hwui/AnimationContext.h
+++ b/libs/hwui/AnimationContext.h
@@ -57,7 +57,7 @@
private:
friend class AnimationContext;
- AnimationHandle(AnimationContext& context);
+ explicit AnimationHandle(AnimationContext& context);
AnimationHandle(RenderNode& animatingNode, AnimationContext& context);
~AnimationHandle();
@@ -75,7 +75,7 @@
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 61f6179..8e6f820 100644
--- a/libs/hwui/AnimatorManager.h
+++ b/libs/hwui/AnimatorManager.h
@@ -35,7 +35,7 @@
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 eac9359..317c122 100644
--- a/libs/hwui/Caches.h
+++ b/libs/hwui/Caches.h
@@ -77,7 +77,7 @@
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 6074394..56671bb 100644
--- a/libs/hwui/CanvasProperty.h
+++ b/libs/hwui/CanvasProperty.h
@@ -28,7 +28,7 @@
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 @@
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 b9e87ae..22feef5 100644
--- a/libs/hwui/CanvasState.h
+++ b/libs/hwui/CanvasState.h
@@ -73,7 +73,7 @@
class CanvasState {
public:
- CanvasState(CanvasStateClient& renderer);
+ explicit CanvasState(CanvasStateClient& renderer);
~CanvasState();
/**
diff --git a/libs/hwui/DeferredDisplayList.h b/libs/hwui/DeferredDisplayList.h
index 98ccf11..15703ea 100644
--- a/libs/hwui/DeferredDisplayList.h
+++ b/libs/hwui/DeferredDisplayList.h
@@ -77,7 +77,7 @@
class DeferredDisplayList {
friend struct DeferStateStruct; // used to give access to allocator
public:
- DeferredDisplayList(const Rect& bounds)
+ explicit DeferredDisplayList(const Rect& bounds)
: mBounds(bounds) {
clear();
}
diff --git a/libs/hwui/Dither.h b/libs/hwui/Dither.h
index b589b80..6af3e83 100644
--- a/libs/hwui/Dither.h
+++ b/libs/hwui/Dither.h
@@ -37,7 +37,7 @@
*/
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 0baca39..afab84c 100644
--- a/libs/hwui/FrameInfo.h
+++ b/libs/hwui/FrameInfo.h
@@ -65,7 +65,7 @@
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 83adf19..719d0f8 100644
--- a/libs/hwui/FrameInfoVisualizer.h
+++ b/libs/hwui/FrameInfoVisualizer.h
@@ -45,7 +45,7 @@
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 dccd450..49be19a 100644
--- a/libs/hwui/GradientCache.h
+++ b/libs/hwui/GradientCache.h
@@ -103,7 +103,7 @@
*/
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 84b8c3f..a23dd78 100644
--- a/libs/hwui/JankTracker.h
+++ b/libs/hwui/JankTracker.h
@@ -56,7 +56,7 @@
// 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 6fe7b3a..7a1a9ae 100644
--- a/libs/hwui/LayerCache.h
+++ b/libs/hwui/LayerCache.h
@@ -105,7 +105,7 @@
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 9cde5d6..ba9cbbe 100644
--- a/libs/hwui/Matrix.h
+++ b/libs/hwui/Matrix.h
@@ -81,11 +81,11 @@
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
old mode 100755
new mode 100644
index dacd8cc..ec450bd6
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -116,7 +116,7 @@
*/
class OpenGLRenderer : public CanvasStateClient {
public:
- OpenGLRenderer(RenderState& renderState);
+ explicit OpenGLRenderer(RenderState& renderState);
virtual ~OpenGLRenderer();
void initProperties();
diff --git a/libs/hwui/PatchCache.h b/libs/hwui/PatchCache.h
index 66ef6a0..bc5981d 100644
--- a/libs/hwui/PatchCache.h
+++ b/libs/hwui/PatchCache.h
@@ -51,7 +51,7 @@
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 6368ddd..e1fcc31 100644
--- a/libs/hwui/PathCache.h
+++ b/libs/hwui/PathCache.h
@@ -288,7 +288,7 @@
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 1dadda1..9ac885b 100644
--- a/libs/hwui/ProgramCache.h
+++ b/libs/hwui/ProgramCache.h
@@ -40,7 +40,7 @@
*/
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 de4fa55..dbd188f 100644
--- a/libs/hwui/Rect.h
+++ b/libs/hwui/Rect.h
@@ -73,7 +73,7 @@
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 f77f4c9..6444331 100644
--- a/libs/hwui/RenderBufferCache.h
+++ b/libs/hwui/RenderBufferCache.h
@@ -82,7 +82,7 @@
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 4583c8d..3ac7864 100644
--- a/libs/hwui/ResourceCache.h
+++ b/libs/hwui/ResourceCache.h
@@ -42,7 +42,7 @@
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 973c55f..c03c523 100644
--- a/libs/hwui/SkiaCanvasProxy.h
+++ b/libs/hwui/SkiaCanvasProxy.h
@@ -39,7 +39,7 @@
*/
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 d536c40..13e8774 100644
--- a/libs/hwui/TextDropShadowCache.h
+++ b/libs/hwui/TextDropShadowCache.h
@@ -111,7 +111,7 @@
* Alpha texture used to represent a shadow.
*/
struct ShadowTexture: public Texture {
- ShadowTexture(Caches& caches): Texture(caches) {
+ explicit ShadowTexture(Caches& caches): Texture(caches) {
}
float left;
@@ -121,7 +121,7 @@
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 9749f73..b72742f 100644
--- a/libs/hwui/Texture.h
+++ b/libs/hwui/Texture.h
@@ -34,7 +34,7 @@
*/
class Texture : public GpuMemoryTracker {
public:
- Texture(Caches& caches)
+ explicit Texture(Caches& caches)
: GpuMemoryTracker(GpuObjectType::Texture)
, mCaches(caches)
{ }
@@ -171,7 +171,7 @@
class AutoTexture {
public:
- AutoTexture(Texture* texture)
+ explicit AutoTexture(Texture* texture)
: texture(texture) {}
~AutoTexture() {
if (texture && texture->cleanup) {
diff --git a/libs/hwui/renderthread/RenderTask.h b/libs/hwui/renderthread/RenderTask.h
index 89c3a7d..9ea671b 100644
--- a/libs/hwui/renderthread/RenderTask.h
+++ b/libs/hwui/renderthread/RenderTask.h
@@ -73,7 +73,7 @@
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 0a7acb0..17f82ba9 100644
--- a/libs/hwui/thread/Barrier.h
+++ b/libs/hwui/thread/Barrier.h
@@ -24,7 +24,7 @@
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 a3ff3bc..177eebd 100644
--- a/libs/hwui/thread/Future.h
+++ b/libs/hwui/thread/Future.h
@@ -27,7 +27,7 @@
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 d4cfeeb..93e6f4c 100644
--- a/libs/hwui/thread/Signal.h
+++ b/libs/hwui/thread/Signal.h
@@ -26,7 +26,7 @@
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 e4808f7..0e4ffdc 100644
--- a/libs/hwui/thread/TaskManager.h
+++ b/libs/hwui/thread/TaskManager.h
@@ -78,7 +78,7 @@
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(const TaskWrapper& task);
size_t getTaskCount() const;
diff --git a/libs/hwui/thread/TaskProcessor.h b/libs/hwui/thread/TaskProcessor.h
index 82538e9..5867450 100644
--- a/libs/hwui/thread/TaskProcessor.h
+++ b/libs/hwui/thread/TaskProcessor.h
@@ -36,7 +36,7 @@
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) {