Bug 1528881 - Part 8: gfx/layers: Move ShutdownTileCache() function declaration to header file. r=mattwoodrow
authorChris Peterson <cpeterson@mozilla.com>
Sun, 17 Feb 2019 14:18:57 -0800
changeset 519496 13bf48ec0625e11cd3a21e0db5da6bbc26b965fa
parent 519495 53e277d161b2d43dccbc3b294ef14212bd4f9314
child 519497 0df9a1e522afbc4fedd23fa72bc307aac7d06185
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1528881
milestone67.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 1528881 - Part 8: gfx/layers: Move ShutdownTileCache() function declaration to header file. r=mattwoodrow clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called). In this case, moving ShutdownTileCache()'s function declaration to the header file TiledContentClient.h means the same declaration will be seen by the TiledContentClient.cpp file defining the function and the gfxPlatform.cpp calling the function. gfx/layers/client/TiledContentClient.cpp:337:6 [-Wmissing-prototypes] no previous prototype for function 'ShutdownTileCache' Differential Revision: https://phabricator.services.mozilla.com/D20267
gfx/layers/client/TiledContentClient.h
gfx/thebes/gfxPlatform.cpp
--- a/gfx/layers/client/TiledContentClient.h
+++ b/gfx/layers/client/TiledContentClient.h
@@ -46,16 +46,18 @@ class ClientLayerManager;
 
 enum class TilePaintFlags : uint8_t {
   None = 0x0,
   Async = 0x1,
   Progressive = 0x2,
 };
 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(TilePaintFlags)
 
+void ShutdownTileCache();
+
 struct AcquiredBackBuffer {
   AcquiredBackBuffer(gfx::DrawTarget* aTarget, gfx::DrawTargetCapture* aCapture,
                      gfx::DrawTarget* aBackBuffer,
                      const gfx::IntRect& aUpdatedRect,
                      AutoTArray<RefPtr<TextureClient>, 4>&& aTextureClients)
       : mTarget(aTarget),
         mCapture(aCapture),
         mBackBuffer(aBackBuffer),
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -6,16 +6,17 @@
 #include "mozilla/FontPropertyTypes.h"
 #include "mozilla/RDDProcessManager.h"
 #include "mozilla/image/ImageMemoryReporter.h"
 #include "mozilla/layers/CompositorManagerChild.h"
 #include "mozilla/layers/CompositorThread.h"
 #include "mozilla/layers/ImageBridgeChild.h"
 #include "mozilla/layers/ISurfaceAllocator.h"  // for GfxMemoryImageReporter
 #include "mozilla/layers/CompositorBridgeChild.h"
+#include "mozilla/layers/TiledContentClient.h"
 #include "mozilla/webrender/RenderThread.h"
 #include "mozilla/webrender/WebRenderAPI.h"
 #include "mozilla/webrender/webrender_ffi.h"
 #include "mozilla/layers/PaintThread.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/gfx/GraphicsMessages.h"
 #include "mozilla/ClearOnShutdown.h"
@@ -143,22 +144,16 @@ class mozilla::gl::SkiaGLGlue : public G
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/TouchEvent.h"
 #include "gfxVR.h"
 #include "VRManagerChild.h"
 #include "mozilla/gfx/GPUParent.h"
 #include "mozilla/layers/MemoryReportingMLGPU.h"
 #include "prsystem.h"
 
-namespace mozilla {
-namespace layers {
-void ShutdownTileCache();
-}  // namespace layers
-}  // namespace mozilla
-
 using namespace mozilla;
 using namespace mozilla::layers;
 using namespace mozilla::gl;
 using namespace mozilla::gfx;
 
 gfxPlatform* gPlatform = nullptr;
 static bool gEverInitialized = false;