diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index b58df35e2c..0d4ae4220a 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -106,7 +106,7 @@ enum MultiTouchAction Framework::Framework() : m_lastCompass(0.0) - , m_isContextDestroyed(false) + , m_isSurfaceDestroyed(false) , m_currentMode(location::PendingPosition) , m_isCurrentModeInitialized(false) , m_isChoosePositionMode(false) @@ -163,7 +163,7 @@ void Framework::TransitSchemeStateChanged(TransitReadManager::TransitSchemeState m_onTransitStateChangedFn(state); } -bool Framework::DestroyContextOnSurfaceDetach() +bool Framework::DestroySurfaceOnDetach() { if (m_vulkanContextFactory) return false; @@ -219,7 +219,7 @@ bool Framework::CreateDrapeEngine(JNIEnv * env, jobject jSurface, int densityDpi { CHECK(oglFactory != nullptr, ()); p.m_apiVersion = oglFactory->IsSupportedOpenGLES3() ? dp::ApiVersion::OpenGLES3 : - dp::ApiVersion::OpenGLES2; + dp::ApiVersion::OpenGLES2; p.m_surfaceWidth = oglFactory->GetWidth(); p.m_surfaceHeight = oglFactory->GetHeight(); } @@ -256,7 +256,7 @@ void Framework::Resize(JNIEnv * env, jobject jSurface, int w, int h) if (vulkanContextFactory->GetWidth() != w || vulkanContextFactory->GetHeight() != h) { m_vulkanContextFactory->SetPresentAvailable(false); - m_work.SetRenderingDisabled(false /* destroyContext */); + m_work.SetRenderingDisabled(false /* destroySurface */); vulkanContextFactory->ChangeSurface(env, jSurface, w, h); @@ -274,9 +274,9 @@ void Framework::Resize(JNIEnv * env, jobject jSurface, int w, int h) frm()->SetVisibleViewport(m2::RectD(0, 0, w, h)); } -void Framework::DetachSurface(bool destroyContext) +void Framework::DetachSurface(bool destroySurface) { - LOG(LINFO, ("Detach surface started. destroyContext =", destroyContext)); + LOG(LINFO, ("Detach surface started. destroySurface =", destroySurface)); if (m_vulkanContextFactory) { m_vulkanContextFactory->SetPresentAvailable(false); @@ -287,12 +287,12 @@ void Framework::DetachSurface(bool destroyContext) m_oglContextFactory->SetPresentAvailable(false); } - if (destroyContext) + if (destroySurface) { - LOG(LINFO, ("Destroy context.")); - m_isContextDestroyed = true; + LOG(LINFO, ("Destroy surface.")); + m_isSurfaceDestroyed = true; m_work.EnterBackground(); - m_work.OnDestroyGLContext(); + m_work.OnDestroySurface(); } if (m_vulkanContextFactory) @@ -301,14 +301,14 @@ void Framework::DetachSurface(bool destroyContext) // we have to destroy only resources bound with surface (swapchains, // image views, framebuffers and command buffers). All these resources will be // destroyed in ResetSurface(). - m_work.SetRenderingDisabled(false /* destroyContext */); + m_work.SetRenderingDisabled(false /* destroySurface */); // Allow pipeline dump only on enter background. - CastFactory(m_vulkanContextFactory)->ResetSurface(destroyContext /* allowPipelineDump */); + CastFactory(m_vulkanContextFactory)->ResetSurface(destroySurface /* allowPipelineDump */); } else { - m_work.SetRenderingDisabled(destroyContext); + m_work.SetRenderingDisabled(destroySurface); auto factory = m_oglContextFactory->CastFactory(); factory->ResetSurface(); } @@ -359,11 +359,11 @@ bool Framework::AttachSurface(JNIEnv * env, jobject jSurface) m_work.SetRenderingEnabled(make_ref(m_oglContextFactory)); } - if (m_isContextDestroyed) + if (m_isSurfaceDestroyed) { - LOG(LINFO, ("Recover GL resources, viewport size:", w, h)); - m_work.OnRecoverGLContext(w, h); - m_isContextDestroyed = false; + LOG(LINFO, ("Recover surface, viewport size:", w, h)); + m_work.OnRecoverSurface(w, h); + m_isSurfaceDestroyed = false; m_work.EnterForeground(); } diff --git a/android/jni/com/mapswithme/maps/Framework.hpp b/android/jni/com/mapswithme/maps/Framework.hpp index 77429eed5e..bd313352bf 100644 --- a/android/jni/com/mapswithme/maps/Framework.hpp +++ b/android/jni/com/mapswithme/maps/Framework.hpp @@ -61,7 +61,7 @@ namespace android std::string m_searchQuery; - bool m_isContextDestroyed; + bool m_isSurfaceDestroyed; std::map m_guiPositions; @@ -97,8 +97,8 @@ namespace android bool CreateDrapeEngine(JNIEnv * env, jobject jSurface, int densityDpi, bool firstLaunch, bool launchByDeepLink, int appVersionCode); bool IsDrapeEngineCreated(); - bool DestroyContextOnSurfaceDetach(); - void DetachSurface(bool destroyContext); + bool DestroySurfaceOnDetach(); + void DetachSurface(bool destroySurface); bool AttachSurface(JNIEnv * env, jobject jSurface); void PauseSurfaceRendering(); void ResumeSurfaceRendering(); diff --git a/android/jni/com/mapswithme/maps/MapFragment.cpp b/android/jni/com/mapswithme/maps/MapFragment.cpp index 927eca9041..612ba9aa60 100644 --- a/android/jni/com/mapswithme/maps/MapFragment.cpp +++ b/android/jni/com/mapswithme/maps/MapFragment.cpp @@ -75,9 +75,9 @@ Java_com_mapswithme_maps_MapFragment_nativeIsEngineCreated(JNIEnv * env, jclass } JNIEXPORT jboolean JNICALL -Java_com_mapswithme_maps_MapFragment_nativeDestroyContextOnSurfaceDetach(JNIEnv * env, jclass clazz) +Java_com_mapswithme_maps_MapFragment_nativeDestroySurfaceOnDetach(JNIEnv * env, jclass clazz) { - return g_framework->DestroyContextOnSurfaceDetach(); + return g_framework->DestroySurfaceOnDetach(); } JNIEXPORT jboolean JNICALL @@ -89,9 +89,9 @@ Java_com_mapswithme_maps_MapFragment_nativeAttachSurface(JNIEnv * env, jclass cl JNIEXPORT void JNICALL Java_com_mapswithme_maps_MapFragment_nativeDetachSurface(JNIEnv * env, jclass clazz, - jboolean destroyContext) + jboolean destroySurface) { - g_framework->DetachSurface(destroyContext); + g_framework->DetachSurface(destroySurface); } JNIEXPORT void JNICALL diff --git a/android/jni/com/mapswithme/vulkan/android_vulkan_context_factory.cpp b/android/jni/com/mapswithme/vulkan/android_vulkan_context_factory.cpp index 73146bd160..7d361312ff 100644 --- a/android/jni/com/mapswithme/vulkan/android_vulkan_context_factory.cpp +++ b/android/jni/com/mapswithme/vulkan/android_vulkan_context_factory.cpp @@ -348,6 +348,7 @@ bool AndroidVulkanContextFactory::QuerySurfaceSize() void AndroidVulkanContextFactory::ResetSurface(bool allowPipelineDump) { + CHECK(m_nativeWindow != nullptr, ()); ResetVulkanSurface(allowPipelineDump); ANativeWindow_release(m_nativeWindow); diff --git a/android/src/com/mapswithme/maps/MapFragment.java b/android/src/com/mapswithme/maps/MapFragment.java index 181ce4f099..372f578e53 100644 --- a/android/src/com/mapswithme/maps/MapFragment.java +++ b/android/src/com/mapswithme/maps/MapFragment.java @@ -63,7 +63,7 @@ public class MapFragment extends BaseMwmFragment private int mHeight; private int mWidth; private boolean mRequireResize; - private boolean mContextCreated; + private boolean mSurfaceCreated; private boolean mSurfaceAttached; private boolean mLaunchByDeepLink; private static boolean sWasCopyrightDisplayed; @@ -113,7 +113,7 @@ public class MapFragment extends BaseMwmFragment mWidth - marginX, offsetY + marginY, ANCHOR_CENTER); - if (forceRedraw && mContextCreated) + if (forceRedraw && mSurfaceCreated) nativeApplyWidgets(); } @@ -123,7 +123,7 @@ public class MapFragment extends BaseMwmFragment UiUtils.dimen(R.dimen.margin_ruler_left), mHeight - UiUtils.dimen(R.dimen.margin_ruler_bottom) + offsetY, ANCHOR_LEFT_BOTTOM); - if (forceRedraw && mContextCreated) + if (forceRedraw && mSurfaceCreated) nativeApplyWidgets(); } @@ -133,7 +133,7 @@ public class MapFragment extends BaseMwmFragment mWidth - UiUtils.dimen(R.dimen.margin_watermark_right), mHeight - UiUtils.dimen(R.dimen.margin_watermark_bottom) + offsetY, ANCHOR_RIGHT_BOTTOM); - if (forceRedraw && mContextCreated) + if (forceRedraw && mSurfaceCreated) nativeApplyWidgets(); } @@ -175,7 +175,7 @@ public class MapFragment extends BaseMwmFragment return; } - LOGGER.d(TAG, "surfaceCreated, mContextCreated = " + mContextCreated); + LOGGER.d(TAG, "surfaceCreated, mSurfaceCreated = " + mSurfaceCreated); final Surface surface = surfaceHolder.getSurface(); if (nativeIsEngineCreated()) { @@ -184,7 +184,7 @@ public class MapFragment extends BaseMwmFragment reportUnsupported(); return; } - mContextCreated = true; + mSurfaceCreated = true; mSurfaceAttached = true; mRequireResize = true; return; @@ -218,7 +218,7 @@ public class MapFragment extends BaseMwmFragment }); } - mContextCreated = true; + mSurfaceCreated = true; mSurfaceAttached = true; onRenderingInitialized(); } @@ -232,8 +232,8 @@ public class MapFragment extends BaseMwmFragment return; } - LOGGER.d(TAG, "surfaceChanged, mContextCreated = " + mContextCreated); - if (!mContextCreated || (!mRequireResize && surfaceHolder.isCreating())) + LOGGER.d(TAG, "surfaceChanged, mSurfaceCreated = " + mSurfaceCreated); + if (!mSurfaceCreated || (!mRequireResize && surfaceHolder.isCreating())) return; final Surface surface = surfaceHolder.getSurface(); @@ -249,19 +249,19 @@ public class MapFragment extends BaseMwmFragment public void surfaceDestroyed(SurfaceHolder surfaceHolder) { LOGGER.d(TAG, "surfaceDestroyed"); - destroyContext(); + destroySurface(); } - void destroyContext() + void destroySurface() { - LOGGER.d(TAG, "destroyContext, mContextCreated = " + mContextCreated + + LOGGER.d(TAG, "destroySurface, mSurfaceCreated = " + mSurfaceCreated + ", mSurfaceAttached = " + mSurfaceAttached + ", isAdded = " + isAdded(), new Throwable()); - if (!mContextCreated || !mSurfaceAttached || !isAdded()) + if (!mSurfaceCreated || !mSurfaceAttached || !isAdded()) return; nativeDetachSurface(!getActivity().isChangingConfigurations()); - mContextCreated = !nativeDestroyContextOnSurfaceDetach(); + mSurfaceCreated = !nativeDestroySurfaceOnDetach(); mSurfaceAttached = false; } @@ -361,7 +361,7 @@ public class MapFragment extends BaseMwmFragment boolean isContextCreated() { - return mContextCreated; + return mSurfaceCreated; } static native void nativeCompassUpdated(double magneticNorth, double trueNorth, boolean forceRedraw); @@ -369,13 +369,13 @@ public class MapFragment extends BaseMwmFragment static native void nativeScaleMinus(); static native boolean nativeShowMapForUrl(String url); static native boolean nativeIsEngineCreated(); - static native boolean nativeDestroyContextOnSurfaceDetach(); + static native boolean nativeDestroySurfaceOnDetach(); private static native boolean nativeCreateEngine(Surface surface, int density, boolean firstLaunch, boolean isLaunchByDeepLink, int appVersionCode); private static native boolean nativeAttachSurface(Surface surface); - private static native void nativeDetachSurface(boolean destroyContext); + private static native void nativeDetachSurface(boolean destroySurface); private static native void nativePauseSurfaceRendering(); private static native void nativeResumeSurfaceRendering(); private static native void nativeSurfaceChanged(Surface surface, int w, int h); diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java index 66616bd22b..831ea4829a 100644 --- a/android/src/com/mapswithme/maps/MwmActivity.java +++ b/android/src/com/mapswithme/maps/MwmActivity.java @@ -1189,9 +1189,9 @@ public class MwmActivity extends BaseMwmFragmentActivity @Override public void recreate() { - // Explicitly destroy context before activity recreation. + // Explicitly destroy surface before activity recreation. if (mMapFragment != null) - mMapFragment.destroyContext(); + mMapFragment.destroySurface(); super.recreate(); } diff --git a/drape/CMakeLists.txt b/drape/CMakeLists.txt index 53a3e292a9..f12c6a3dfe 100644 --- a/drape/CMakeLists.txt +++ b/drape/CMakeLists.txt @@ -160,8 +160,6 @@ append( ${DRAPE_ROOT}/vulkan/vulkan_memory_manager.cpp ${DRAPE_ROOT}/vulkan/vulkan_memory_manager.hpp ${DRAPE_ROOT}/vulkan/vulkan_mesh_object_impl.cpp - ${DRAPE_ROOT}/vulkan/vulkan_texture.cpp - ${DRAPE_ROOT}/vulkan/vulkan_texture.hpp ${DRAPE_ROOT}/vulkan/vulkan_object_manager.cpp ${DRAPE_ROOT}/vulkan/vulkan_object_manager.hpp ${DRAPE_ROOT}/vulkan/vulkan_param_descriptor.cpp @@ -170,6 +168,8 @@ append( ${DRAPE_ROOT}/vulkan/vulkan_pipeline.hpp ${DRAPE_ROOT}/vulkan/vulkan_staging_buffer.cpp ${DRAPE_ROOT}/vulkan/vulkan_staging_buffer.hpp + ${DRAPE_ROOT}/vulkan/vulkan_texture.cpp + ${DRAPE_ROOT}/vulkan/vulkan_texture.hpp ${DRAPE_ROOT}/vulkan/vulkan_utils.cpp ${DRAPE_ROOT}/vulkan/vulkan_utils.hpp ${DRAPE_ROOT}/vulkan/vulkan_vertex_array_buffer_impl.cpp diff --git a/drape/vulkan/vulkan_base_context.cpp b/drape/vulkan/vulkan_base_context.cpp index ce60938904..bc49774532 100644 --- a/drape/vulkan/vulkan_base_context.cpp +++ b/drape/vulkan/vulkan_base_context.cpp @@ -205,6 +205,8 @@ bool VulkanBaseContext::BeginRendering() if (res == VK_ERROR_OUT_OF_DATE_KHR || res == VK_SUBOPTIMAL_KHR) { RecreateSwapchainAndDependencies(); + DestroySyncPrimitives(); + CreateSyncPrimitives(); return false; } else diff --git a/drape/vulkan/vulkan_object_manager.cpp b/drape/vulkan/vulkan_object_manager.cpp index 9919cb471a..30c69dce35 100644 --- a/drape/vulkan/vulkan_object_manager.cpp +++ b/drape/vulkan/vulkan_object_manager.cpp @@ -44,11 +44,13 @@ VulkanObjectManager::VulkanObjectManager(VkDevice device, VkPhysicalDeviceLimits , m_queueFamilyIndex(queueFamilyIndex) , m_memoryManager(device, deviceLimits, memoryProperties) { + size_t constexpr kAvgDestroyCount = 50; + for (auto & q : m_queuesToDestroy[ThreadType::Frontend]) - q.reserve(50); + q.reserve(kAvgDestroyCount); for (auto & descriptorsToDestroy : m_descriptorsToDestroy) - descriptorsToDestroy.reserve(50); + descriptorsToDestroy.reserve(kAvgDestroyCount); CreateDescriptorPool(); } @@ -362,9 +364,9 @@ void VulkanObjectManager::Fill(VulkanObject object, void const * data, uint32_t void VulkanObjectManager::CreateDescriptorPool() { // Maximum uniform buffers descriptors count per frame. - uint32_t constexpr kMaxUniformBufferDescriptorsCount = 500; + uint32_t constexpr kMaxUniformBufferDescriptorsCount = 500 * kMaxInflightFrames; // Maximum textures descriptors count per frame. - uint32_t constexpr kMaxImageSamplerDescriptorsCount = 1000; + uint32_t constexpr kMaxImageSamplerDescriptorsCount = 1000 * kMaxInflightFrames; std::vector poolSizes = { diff --git a/drape_frontend/base_renderer.cpp b/drape_frontend/base_renderer.cpp index f6b2852a8f..8889a2e895 100644 --- a/drape_frontend/base_renderer.cpp +++ b/drape_frontend/base_renderer.cpp @@ -47,9 +47,9 @@ void BaseRenderer::SetRenderingEnabled(ref_ptr conte SetRenderingEnabled(true); } -void BaseRenderer::SetRenderingDisabled(bool const destroyContext) +void BaseRenderer::SetRenderingDisabled(bool const destroySurface) { - if (destroyContext) + if (destroySurface) m_wasContextReset = true; SetRenderingEnabled(false); } diff --git a/drape_frontend/base_renderer.hpp b/drape_frontend/base_renderer.hpp index 5b0893d93b..d426e6baf3 100644 --- a/drape_frontend/base_renderer.hpp +++ b/drape_frontend/base_renderer.hpp @@ -52,7 +52,7 @@ public: bool CanReceiveMessages(); void SetRenderingEnabled(ref_ptr contextFactory); - void SetRenderingDisabled(bool const destroyContext); + void SetRenderingDisabled(bool const destroySurface); bool IsRenderingEnabled() const; diff --git a/drape_frontend/drape_engine.cpp b/drape_frontend/drape_engine.cpp index 7f39627f7b..19779b6a2b 100644 --- a/drape_frontend/drape_engine.cpp +++ b/drape_frontend/drape_engine.cpp @@ -352,10 +352,10 @@ void DrapeEngine::SetRenderingEnabled(ref_ptr contex LOG(LDEBUG, ("Rendering enabled")); } -void DrapeEngine::SetRenderingDisabled(bool const destroyContext) +void DrapeEngine::SetRenderingDisabled(bool const destroySurface) { - m_frontend->SetRenderingDisabled(destroyContext); - m_backend->SetRenderingDisabled(destroyContext); + m_frontend->SetRenderingDisabled(destroySurface); + m_backend->SetRenderingDisabled(destroySurface); LOG(LDEBUG, ("Rendering disabled")); } diff --git a/drape_frontend/drape_engine.hpp b/drape_frontend/drape_engine.hpp index 8e6edbca16..93fadf27e7 100644 --- a/drape_frontend/drape_engine.hpp +++ b/drape_frontend/drape_engine.hpp @@ -142,7 +142,7 @@ public: void InvalidateUserMarks(); void SetRenderingEnabled(ref_ptr contextFactory = nullptr); - void SetRenderingDisabled(bool const destroyContext); + void SetRenderingDisabled(bool const destroySurface); void InvalidateRect(m2::RectD const & rect); void UpdateMapStyle(); diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index 2b51d410c8..ace8e8102d 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -526,7 +526,7 @@ using namespace osm_auth_ios; if ([AppInfo sharedInfo].openGLDriver == MWMOpenGLDriverMetalPre103) { f.SetRenderingDisabled(true); - f.OnDestroyGLContext(); + f.OnDestroySurface(); } else { @@ -575,7 +575,7 @@ using namespace osm_auth_ios; if ([AppInfo sharedInfo].openGLDriver == MWMOpenGLDriverMetalPre103) { m2::PointU const size = ((EAGLView *)self.mapViewController.view).pixelSize; - f.OnRecoverGLContext(static_cast(size.x), static_cast(size.y)); + f.OnRecoverSurface(static_cast(size.x), static_cast(size.y)); } [MWMLocationManager applicationDidBecomeActive]; [MWMSearch addCategoriesToSpotlight]; diff --git a/map/framework.cpp b/map/framework.cpp index ac80b5f59b..3fa9b278d4 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -360,7 +360,7 @@ void Framework::Migrate(bool keepDownloaded) if (m_drapeEngine && m_isRenderingEnabled) { m_drapeEngine->SetRenderingDisabled(true); - OnDestroyGLContext(); + OnDestroySurface(); } m_selectedFeature = FeatureID(); m_discoveryManager.reset(); @@ -389,8 +389,8 @@ void Framework::Migrate(bool keepDownloaded) if (m_drapeEngine && m_isRenderingEnabled) { m_drapeEngine->SetRenderingEnabled(); - OnRecoverGLContext(m_currentModelView.PixelRectIn3d().SizeX(), - m_currentModelView.PixelRectIn3d().SizeY()); + OnRecoverSurface(m_currentModelView.PixelRectIn3d().SizeX(), + m_currentModelView.PixelRectIn3d().SizeY()); } InvalidateRect(MercatorBounds::FullRect()); } @@ -1902,7 +1902,7 @@ void Framework::CreateDrapeEngine(ref_ptr contextFac benchmark::RunGraphicsBenchmark(this); } -void Framework::OnRecoverGLContext(int width, int height) +void Framework::OnRecoverSurface(int width, int height) { if (m_drapeEngine) { @@ -1915,14 +1915,14 @@ void Framework::OnRecoverGLContext(int width, int height) m_drapeApi.Invalidate(); } - m_trafficManager.OnRecoverGLContext(); + m_trafficManager.OnRecoverSurface(); m_transitManager.Invalidate(); m_localAdsManager.Invalidate(); } -void Framework::OnDestroyGLContext() +void Framework::OnDestroySurface() { - m_trafficManager.OnDestroyGLContext(); + m_trafficManager.OnDestroySurface(); } ref_ptr Framework::GetDrapeEngine() @@ -1955,11 +1955,11 @@ void Framework::SetRenderingEnabled(ref_ptr contextF m_drapeEngine->SetRenderingEnabled(contextFactory); } -void Framework::SetRenderingDisabled(bool destroyContext) +void Framework::SetRenderingDisabled(bool destroySurface) { m_isRenderingEnabled = false; if (m_drapeEngine) - m_drapeEngine->SetRenderingDisabled(destroyContext); + m_drapeEngine->SetRenderingDisabled(destroySurface); } void Framework::EnableDebugRectRendering(bool enabled) diff --git a/map/framework.hpp b/map/framework.hpp index 0847502ef6..5d98b93675 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -508,10 +508,10 @@ public: void DestroyDrapeEngine(); /// Called when graphics engine should be temporarily paused and then resumed. void SetRenderingEnabled(ref_ptr contextFactory = nullptr); - void SetRenderingDisabled(bool destroyContext); + void SetRenderingDisabled(bool destroySurface); - void OnRecoverGLContext(int width, int height); - void OnDestroyGLContext(); + void OnRecoverSurface(int width, int height); + void OnDestroySurface(); private: /// Depends on initialized Drape engine. diff --git a/map/traffic_manager.cpp b/map/traffic_manager.cpp index 0792c4c1e4..300d750c7e 100644 --- a/map/traffic_manager.cpp +++ b/map/traffic_manager.cpp @@ -162,12 +162,12 @@ void TrafficManager::OnMwmDeregistered(platform::LocalCountryFile const & countr } } -void TrafficManager::OnDestroyGLContext() +void TrafficManager::OnDestroySurface() { Pause(); } -void TrafficManager::OnRecoverGLContext() +void TrafficManager::OnRecoverSurface() { Resume(); } diff --git a/map/traffic_manager.hpp b/map/traffic_manager.hpp index 7c9712b715..b14a8f76fd 100644 --- a/map/traffic_manager.hpp +++ b/map/traffic_manager.hpp @@ -75,8 +75,8 @@ public: void Invalidate(); - void OnDestroyGLContext(); - void OnRecoverGLContext(); + void OnDestroySurface(); + void OnRecoverSurface(); void OnMwmDeregistered(platform::LocalCountryFile const & countryFile); void OnEnterForeground();