From cef8cfb15b65361aa256f9ec37029fd5f11bcaf8 Mon Sep 17 00:00:00 2001 From: ananta Date: Mon, 4 May 2015 11:50:57 -0700 Subject: =?UTF-8?q?Revert=20of=20Ensure=20that=20the=20DirectWrite=20font?= =?UTF-8?q?=20cache=20works=20in=20Chrome=20canary=20on=20Windows=208+=20w?= =?UTF-8?q?ith=20AppContainer=20prote=E2=80=A6=20(patchset=20#14=20id:2600?= =?UTF-8?q?01=20of=20https://codereview.chromium.org/1105763004/)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reason for revert: This patch causes a perf regression bug during renderer startup which is triggered when the cache is not available. Will send out a new patch which addresses both issues. The perf bug is here:- https://code.google.com/p/chromium/issues/detail?id=483443 Original issue's description: > Ensure that the DirectWrite font cache works in Chrome canary on Windows 8+ with AppContainer protection. > > The DirectWrite font cache is mapped as a shared section by the renderer processes. The browser creates > the section. On Windows 8+ with AppContainer protection the renderers are unable to open this shared section > as the BaseNamedObjects object directory is virtualized to \Sessions\SessionId\AppContainerNamedObjects. > > This effectively means that the renderers now fallback to the old method of enumerating all fonts while DirectWrite > builds up its font cache. This hurts performance. > > Proposed fix is as below :- > 1. When the renderer process is launched we get notified in the RenderProcessHost::OnProcessLaunched method. > We send a control IPC message here ViewMsg_FontCacheSectionHandle which contains the duplicated font cache > section handle. > > 2. The ViewMsg_FontCacheSectionHandle message is handled by RenderThreadImpl. It ensures that the shared handle > is set by calling a helper function SetFontCacheSectionHandle. This function then triggers the setting of the > DirectWrite font factory in skia. > > 3. Some of the code in the WarmupDirectWrite function is no longer needed like the code to create the font factory > and create some fonts to warm up DirectWrite. This is because DirectWrite in the renderer now uses the custom > font collection which means that most of the code now can run in the sandbox. The only parts which need to run > outside the sandbox are the loading of the dwrite.dll and the code in the FontCollectionLoader which reads fonts > from the registry. > > 4. The GetPreSandboxWarmupFontMgr helper function has been renamed to GetDirectWriteFontManager. > > The UMA metric DirectWrite.Fonts.LoadTime.Cached should be available if the font cache is loaded in the renderer. > > BUG=481285 > R=cpu > > Committed: https://crrev.com/bbca53aa082320e13909d995a9af66bed7de69a8 > Cr-Commit-Position: refs/heads/master@{#327804} TBR=cpu@chromium.org,scottmg@chromium.org,shrikant@chromium.org,scheib@chromium.org,palmer@chromium.org,piman@chromium.org,creis@chromium.org,avi@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=481285 Review URL: https://codereview.chromium.org/1127673002 Cr-Commit-Position: refs/heads/master@{#328160} --- extensions/DEPS | 2 -- 1 file changed, 2 deletions(-) (limited to 'extensions/DEPS') diff --git a/extensions/DEPS b/extensions/DEPS index 61251ff..285b7d3 100644 --- a/extensions/DEPS +++ b/extensions/DEPS @@ -13,8 +13,6 @@ include_rules = [ "+grit/extensions_renderer_resources.h", "+grit/extensions_resources.h", "+testing", - "+sandbox/win/src/sandbox.h", - "+sandbox/win/src/sandbox_policy.h", "+third_party/mojo/src/mojo/public", "+third_party/skia/include", -- cgit v1.1