Bug 1073081 - Fix -Woverloaded-virtual warnings in gonk code. r=sotaro
authorBotond Ballo <botond@mozilla.com>
Mon, 24 Nov 2014 20:03:27 -0500
changeset 245463 31cbba901d07855db7a602997b5e95a9c7263d38
parent 245462 952839f8ea63497e209bbe6db98d1741a6d1e35e
child 245464 3ebcec626dcda164b64a88e6fd34354765ba082a
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1073081
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1073081 - Fix -Woverloaded-virtual warnings in gonk code. r=sotaro
widget/gonk/nativewindow/GonkBufferQueueJB.cpp
widget/gonk/nativewindow/GonkBufferQueueJB.h
widget/gonk/nativewindow/GonkBufferQueueKK.cpp
widget/gonk/nativewindow/GonkBufferQueueKK.h
widget/gonk/nativewindow/GonkConsumerBaseJB.cpp
widget/gonk/nativewindow/GonkConsumerBaseKK.cpp
widget/gonk/nativewindow/IGonkGraphicBufferConsumer.cpp
widget/gonk/nativewindow/IGonkGraphicBufferConsumer.h
--- a/widget/gonk/nativewindow/GonkBufferQueueJB.cpp
+++ b/widget/gonk/nativewindow/GonkBufferQueueJB.cpp
@@ -696,23 +696,23 @@ status_t GonkBufferQueue::disconnect(int
 
     if (listener != NULL) {
         listener->onBuffersReleased();
     }
 
     return err;
 }
 
-void GonkBufferQueue::dump(String8& result) const
+void GonkBufferQueue::dumpToString(String8& result) const
 {
     char buffer[1024];
-    GonkBufferQueue::dump(result, "", buffer, 1024);
+    GonkBufferQueue::dumpToString(result, "", buffer, 1024);
 }
 
-void GonkBufferQueue::dump(String8& result, const char* prefix,
+void GonkBufferQueue::dumpToString(String8& result, const char* prefix,
         char* buffer, size_t SIZE) const
 {
     Mutex::Autolock _l(mMutex);
 
     String8 fifo;
     int fifoSize = 0;
     Fifo::const_iterator i(mQueue.begin());
     while (i != mQueue.end()) {
--- a/widget/gonk/nativewindow/GonkBufferQueueJB.h
+++ b/widget/gonk/nativewindow/GonkBufferQueueJB.h
@@ -250,18 +250,18 @@ public:
     // Successfully calling connect after this will allow the other methods to
     // succeed again.
     //
     // This method will fail if the the GonkBufferQueue is not currently
     // connected to the specified producer API.
     virtual status_t disconnect(int api);
 
     // dump our state in a String
-    virtual void dump(String8& result) const;
-    virtual void dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const;
+    virtual void dumpToString(String8& result) const;
+    virtual void dumpToString(String8& result, const char* prefix, char* buffer, size_t SIZE) const;
 
     // public facing structure for BufferSlot
     struct BufferItem {
 
         BufferItem()
          :
            mTransform(0),
            mScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
--- a/widget/gonk/nativewindow/GonkBufferQueueKK.cpp
+++ b/widget/gonk/nativewindow/GonkBufferQueueKK.cpp
@@ -787,17 +787,17 @@ status_t GonkBufferQueue::disconnect(int
 
     if (listener != NULL) {
         listener->onBuffersReleased();
     }
 
     return err;
 }
 
-void GonkBufferQueue::dump(String8& result, const char* prefix) const {
+void GonkBufferQueue::dumpToString(String8& result, const char* prefix) const {
     Mutex::Autolock _l(mMutex);
 
     String8 fifo;
     int fifoSize = 0;
     Fifo::const_iterator i(mQueue.begin());
     while (i != mQueue.end()) {
         fifo.appendFormat("%02d:%p crop=[%d,%d,%d,%d], "
                 "xform=0x%02x, time=%#llx, scale=%s\n",
--- a/widget/gonk/nativewindow/GonkBufferQueueKK.h
+++ b/widget/gonk/nativewindow/GonkBufferQueueKK.h
@@ -316,17 +316,17 @@ public:
     virtual status_t setConsumerUsageBits(uint32_t usage);
 
     // setTransformHint bakes in rotation to buffers so overlays can be used.
     // The values are enumerated in window.h, e.g.
     // NATIVE_WINDOW_TRANSFORM_ROT_90.  The default is 0 (no transform).
     virtual status_t setTransformHint(uint32_t hint);
 
     // dump our state in a String
-    virtual void dump(String8& result, const char* prefix) const;
+    virtual void dumpToString(String8& result, const char* prefix) const;
 
      mozilla::TemporaryRef<TextureClient> getTextureClientFromBuffer(ANativeWindowBuffer* buffer);
 
     int getSlotFromTextureClientLocked(TextureClient* client) const;
 
 private:
     // freeBufferLocked frees the GraphicBuffer and sync resources for the
     // given slot.
--- a/widget/gonk/nativewindow/GonkConsumerBaseJB.cpp
+++ b/widget/gonk/nativewindow/GonkConsumerBaseJB.cpp
@@ -177,17 +177,17 @@ void GonkConsumerBase::dump(String8& res
 }
 
 void GonkConsumerBase::dumpLocked(String8& result, const char* prefix,
         char* buffer, size_t SIZE) const {
     snprintf(buffer, SIZE, "%smAbandoned=%d\n", prefix, int(mAbandoned));
     result.append(buffer);
 
     if (!mAbandoned) {
-        mBufferQueue->dump(result, prefix, buffer, SIZE);
+        mBufferQueue->dumpToString(result, prefix, buffer, SIZE);
     }
 }
 
 status_t GonkConsumerBase::acquireBufferLocked(GonkBufferQueue::BufferItem *item) {
     status_t err = mBufferQueue->acquireBuffer(item);
     if (err != NO_ERROR) {
         return err;
     }
--- a/widget/gonk/nativewindow/GonkConsumerBaseKK.cpp
+++ b/widget/gonk/nativewindow/GonkConsumerBaseKK.cpp
@@ -157,17 +157,17 @@ void GonkConsumerBase::dump(String8& res
     Mutex::Autolock _l(mMutex);
     dumpLocked(result, prefix);
 }
 
 void GonkConsumerBase::dumpLocked(String8& result, const char* prefix) const {
     result.appendFormat("%smAbandoned=%d\n", prefix, int(mAbandoned));
 
     if (!mAbandoned) {
-        mConsumer->dump(result, prefix);
+        mConsumer->dumpToString(result, prefix);
     }
 }
 
 status_t GonkConsumerBase::acquireBufferLocked(IGonkGraphicBufferConsumer::BufferItem *item,
         nsecs_t presentWhen) {
     status_t err = mConsumer->acquireBuffer(item, presentWhen);
     if (err != NO_ERROR) {
         return err;
--- a/widget/gonk/nativewindow/IGonkGraphicBufferConsumer.cpp
+++ b/widget/gonk/nativewindow/IGonkGraphicBufferConsumer.cpp
@@ -343,17 +343,17 @@ public:
         data.writeInt32(hint);
         status_t result = remote()->transact(SET_TRANSFORM_HINT, data, &reply);
         if (result != NO_ERROR) {
             return result;
         }
         return reply.readInt32();
     }
 
-    virtual void dump(String8& result, const char* prefix) const {
+    virtual void dumpToString(String8& result, const char* prefix) const {
         Parcel data, reply;
         data.writeInterfaceToken(IGonkGraphicBufferConsumer::getInterfaceDescriptor());
         data.writeString8(result);
         data.writeString8(String8(prefix ? prefix : ""));
         remote()->transact(DUMP, data, &reply);
         reply.readString8();
     }
 };
@@ -464,17 +464,17 @@ status_t BnGonkGraphicBufferConsumer::on
             reply->writeInt32(result);
             return NO_ERROR;
         } break;
 
         case DUMP: {
             CHECK_INTERFACE(IGonkGraphicBufferConsumer, data, reply);
             String8 result = data.readString8();
             String8 prefix = data.readString8();
-            static_cast<IGonkGraphicBufferConsumer*>(this)->dump(result, prefix);
+            static_cast<IGonkGraphicBufferConsumer*>(this)->dumpToString(result, prefix);
             reply->writeString8(result);
             return NO_ERROR;
         }
     }
     return BBinder::onTransact(code, data, reply, flags);
 }
 
 }; // namespace android
--- a/widget/gonk/nativewindow/IGonkGraphicBufferConsumer.h
+++ b/widget/gonk/nativewindow/IGonkGraphicBufferConsumer.h
@@ -200,17 +200,17 @@ public:
     virtual status_t setConsumerUsageBits(uint32_t usage) = 0;
 
     // setTransformHint bakes in rotation to buffers so overlays can be used.
     // The values are enumerated in window.h, e.g.
     // NATIVE_WINDOW_TRANSFORM_ROT_90.  The default is 0 (no transform).
     virtual status_t setTransformHint(uint32_t hint) = 0;
 
     // dump state into a string
-    virtual void dump(String8& result, const char* prefix) const = 0;
+    virtual void dumpToString(String8& result, const char* prefix) const = 0;
 
 public:
     DECLARE_META_INTERFACE(GonkGraphicBufferConsumer);
 };
 
 // ----------------------------------------------------------------------------
 
 class BnGonkGraphicBufferConsumer : public BnInterface<IGonkGraphicBufferConsumer>