summaryrefslogtreecommitdiffstats
path: root/ui/gfx
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2015-02-25 09:23:05 -0800
committerScott Graham <scottmg@chromium.org>2015-02-25 17:25:10 +0000
commitf95981fc5a6371498d5e675b3cd13014303b6084 (patch)
treeea1dd87de4e37f0133c820d04feb7c1330f78ad3 /ui/gfx
parent8be8b38a2c30279a89e497ff449cf303461df461 (diff)
downloadchromium_src-f95981fc5a6371498d5e675b3cd13014303b6084.zip
chromium_src-f95981fc5a6371498d5e675b3cd13014303b6084.tar.gz
chromium_src-f95981fc5a6371498d5e675b3cd13014303b6084.tar.bz2
Revert of Fixes for two different HUD issues related to win32k lockdown (patchset #9 id:350001 of https://codereview.chromium.org/900063002/)
Reason for revert: Causes regression in cold start on Android and maybe Mac. Details in http://crbug.com/457248. Original issue's description: > Fixes for two different HUD issues related to win32k lockdown > > 1. Using a GDI bitmap -- switch to SkSurface instead > > 2. Lazily loading a font. This breaks for two different reasons. > The first is a DCHECK for doing IO on the Compositor thread. This > could have been just ignored in general since it's only for debug > usage, the drawbacks of minor jank are limited. > > However, once lockdown is on, the font load hard fails from the > renderer. So, load the typeface before lockdown and pass it into > CC and the hud via LayerTreeSettings. > > R=danakj@chromium.org > BUG=453731,455104 > TEST=run chrome with --enable-win32k-renderer-lockdown --show-fps-counter --ui-show-fps-counter on Win8 > > Committed: https://crrev.com/616a8e656b2d923ed393bde86adc150e555ba799 > Cr-Commit-Position: refs/heads/master@{#314929} TBR=enne@chromium.org,danakj@chromium.org,piman@chromium.org BUG=453731,455104,457248 Review URL: https://codereview.chromium.org/922293006 Cr-Commit-Position: refs/heads/master@{#317648} (cherry picked from commit 1793e0467bb34d2545c0493a557bb038cc2ac6f0) Review URL: https://codereview.chromium.org/951423003 Cr-Commit-Position: refs/branch-heads/2311@{#25} Cr-Branched-From: 09b7de5dd7254947cd4306de907274fa63373d48-refs/heads/master@{#317474}
Diffstat (limited to 'ui/gfx')
-rw-r--r--ui/gfx/BUILD.gn8
-rw-r--r--ui/gfx/gfx.gyp2
-rw-r--r--ui/gfx/hud_font.cc30
-rw-r--r--ui/gfx/hud_font.h20
4 files changed, 2 insertions, 58 deletions
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index 5485a05..47e0056 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -105,8 +105,6 @@ component("gfx") {
"gfx_paths.h",
"gpu_memory_buffer.cc",
"gpu_memory_buffer.h",
- "hud_font.cc",
- "hud_font.h",
"icon_util.cc",
"icon_util.h",
"image/canvas_image_source.cc",
@@ -309,10 +307,8 @@ component("gfx") {
# Windows.
if (is_win) {
- cflags = [
- "/wd4324", # Structure was padded due to __declspec(align()), which is
- # uninteresting.
- ]
+ cflags = [ "/wd4324" ] # Structure was padded due to __declspec(align()), which is
+ # uninteresting.
} else {
sources -= [
"gdi_util.cc",
diff --git a/ui/gfx/gfx.gyp b/ui/gfx/gfx.gyp
index d8da3fe..001d180 100644
--- a/ui/gfx/gfx.gyp
+++ b/ui/gfx/gfx.gyp
@@ -184,8 +184,6 @@
'gpu_memory_buffer.h',
'harfbuzz_font_skia.cc',
'harfbuzz_font_skia.h',
- 'hud_font.cc',
- 'hud_font.h',
'image/canvas_image_source.cc',
'image/canvas_image_source.h',
'image/image.cc',
diff --git a/ui/gfx/hud_font.cc b/ui/gfx/hud_font.cc
deleted file mode 100644
index b64845b..0000000
--- a/ui/gfx/hud_font.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/gfx/hud_font.h"
-
-#include "base/lazy_instance.h"
-#include "third_party/skia/include/core/SkTypeface.h"
-
-namespace ui {
-
-namespace {
-base::LazyInstance<skia::RefPtr<SkTypeface>> g_hud_typeface;
-} // namespace
-
-void SetHudTypeface(skia::RefPtr<SkTypeface> typeface) {
- g_hud_typeface.Get() = typeface;
-}
-
-skia::RefPtr<SkTypeface> GetHudTypeface() {
- if (!g_hud_typeface.Get()) {
- // This will be set pre-sandbox on Windows. On other platforms, just make
- // something here.
- SetHudTypeface(skia::AdoptRef(
- SkTypeface::CreateFromName("monospace", SkTypeface::kBold)));
- }
- return g_hud_typeface.Get();
-}
-
-} // namespace ui
diff --git a/ui/gfx/hud_font.h b/ui/gfx/hud_font.h
deleted file mode 100644
index 3d38d4b..0000000
--- a/ui/gfx/hud_font.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_GFX_HUD_FONT_H_
-#define UI_GFX_HUD_FONT_H_
-
-#include "skia/ext/refptr.h"
-#include "ui/gfx/gfx_export.h"
-
-class SkTypeface;
-
-namespace ui {
-
-GFX_EXPORT void SetHudTypeface(skia::RefPtr<SkTypeface> typeface);
-GFX_EXPORT skia::RefPtr<SkTypeface> GetHudTypeface();
-
-} // namespace ui
-
-#endif // UI_GFX_HUD_FONT_H_