Skip to content

Commit

Permalink
Revert 280410 "Add DirectWrite keepalive every 10mins"
Browse files Browse the repository at this point in the history
Not working or at least thousands of hits on the
CHECK that is telling us that we need a different
approach.

BUG=377932,383542


> Add DirectWrite keepalive every 10mins
> 
> On a 10 minute timer, directly use some DirectWrite APIs that cause 
> work across the ALPC port. This is attempting to fix occasional drops, on
> the theory that the font server is reaping old unused connections.
> 
> (This will probably need to be merged to 37)
> 
> R=cpu@chromium.org, jam@chromium.org, bungeman@google.com
> TBR=darin@chromium.org
> BUG=377932,383542
> 
> Review URL: https://codereview.chromium.org/330913011

TBR=scottmg@chromium.org

Review URL: https://codereview.chromium.org/359403003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280695 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
cpu@chromium.org committed Jun 30, 2014
1 parent dffd8a9 commit 8e8844d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 70 deletions.
10 changes: 0 additions & 10 deletions content/public/renderer/render_font_warmup_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

#include "base/debug/alias.h"
#include "base/logging.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "skia/ext/directwrite_keepalive_win.h"
#include "third_party/WebKit/public/web/win/WebFontRendering.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/ports/SkFontMgr.h"
Expand All @@ -20,9 +17,7 @@ namespace content {

namespace {

struct Unused {};
SkFontMgr* g_warmup_fontmgr = NULL;
base::RepeatingTimer<Unused>* g_keepalive_timer = NULL;

// Windows-only DirectWrite support. These warm up the DirectWrite paths
// before sandbox lock down to allow Skia access to the Font Manager service.
Expand Down Expand Up @@ -68,11 +63,6 @@ SkFontMgr* GetPreSandboxWarmupFontMgr() {
CreateDirectWriteFactory(&factory);
blink::WebFontRendering::setDirectWriteFactory(factory);
g_warmup_fontmgr = SkFontMgr_New_DirectWrite(factory);
g_keepalive_timer = new base::RepeatingTimer<Unused>;
g_keepalive_timer->Start(
FROM_HERE,
base::TimeDelta::FromMinutes(10),
base::Bind(SkiaDirectWriteKeepalive, g_warmup_fontmgr));
}
return g_warmup_fontmgr;
}
Expand Down
10 changes: 5 additions & 5 deletions content/shell/renderer/shell_content_renderer_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ ShellContentRendererClient::ShellContentRendererClient() {
base::Bind(&ShellContentRendererClient::WebTestProxyCreated,
base::Unretained(this)));
}

#if defined(OS_WIN)
if (ShouldUseDirectWrite())
RegisterSideloadedTypefaces(GetPreSandboxWarmupFontMgr());
#endif
}

ShellContentRendererClient::~ShellContentRendererClient() {
Expand All @@ -84,11 +89,6 @@ void ShellContentRendererClient::RenderThreadStarted() {
// value.
base::debug::BeingDebugged();
#endif

#if defined(OS_WIN)
if (ShouldUseDirectWrite())
RegisterSideloadedTypefaces(GetPreSandboxWarmupFontMgr());
#endif
}

void ShellContentRendererClient::RenderFrameCreated(RenderFrame* render_frame) {
Expand Down
32 changes: 0 additions & 32 deletions skia/ext/directwrite_keepalive_win.cc

This file was deleted.

15 changes: 0 additions & 15 deletions skia/ext/directwrite_keepalive_win.h

This file was deleted.

8 changes: 0 additions & 8 deletions skia/skia_chrome.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
'ext/bitmap_platform_device_win.h',
'ext/convolver.cc',
'ext/convolver.h',
'ext/directwrite_keepalive_win.cc',
'ext/directwrite_keepalive_win.h',
'ext/event_tracer_impl.cc',
'ext/event_tracer_impl.h',
'ext/fontmgr_default_win.cc',
Expand Down Expand Up @@ -117,12 +115,6 @@
'ext/bitmap_platform_device_skia.cc',
],
}],
['OS=="win"', {
'include_dirs': [
'../third_party/skia/include/utils/win',
'../third_party/skia/src/utils/win',
],
}],
],

'target_conditions': [
Expand Down

0 comments on commit 8e8844d

Please sign in to comment.