Skip to content

Commit

Permalink
Reverting this to see if this is the cause of the XP test redness. Wi…
Browse files Browse the repository at this point in the history
…ll reland if this is not the case.

http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29

Revert "Add ANGLE Platform implementation."

This reverts commit efe950c.

R=jmadill@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#320036}
  • Loading branch information
Anantanarayanan Iyengar committed Mar 11, 2015
1 parent 54beb8f commit 49f1920
Show file tree
Hide file tree
Showing 18 changed files with 16 additions and 177 deletions.
1 change: 0 additions & 1 deletion ash/ash_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,5 @@
],
'includes': [
'../base/base.isolate',
'../third_party/angle/angle.isolate',
],
}
1 change: 0 additions & 1 deletion cc/cc_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,5 @@
],
'includes': [
'../base/base.isolate',
'../third_party/angle/angle.isolate',
],
}
1 change: 0 additions & 1 deletion chrome/sync_integration_tests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,5 @@
'includes': [
'../base/base.isolate',
'../gin/v8.isolate',
'../third_party/angle/angle.isolate',
],
}
1 change: 0 additions & 1 deletion chrome/unit_tests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,5 @@
'includes': [
'../base/base.isolate',
'../gin/v8.isolate',
'../third_party/angle/angle.isolate',
],
}
1 change: 0 additions & 1 deletion components/components_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,5 @@
],
'includes': [
'../base/base.isolate',
'../third_party/angle/angle.isolate',
],
}
1 change: 0 additions & 1 deletion content/content_browsertests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,5 @@
'includes': [
'../base/base.isolate',
'../gin/v8.isolate',
'../third_party/angle/angle.isolate',
],
}
5 changes: 4 additions & 1 deletion content/content_gpu.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@
['OS=="win"', {
'include_dirs': [
'<(DEPTH)/third_party/khronos',
# ANGLE libs picked up from ui/gl
'<(angle_path)/src',
'<(DEPTH)/third_party/wtl/include',
],
'dependencies': [
'<(angle_path)/src/angle.gyp:libEGL',
'<(angle_path)/src/angle.gyp:libGLESv2',
],
'link_settings': {
'libraries': [
'-lsetupapi.lib',
Expand Down
1 change: 0 additions & 1 deletion content/content_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,5 @@
'includes': [
'../base/base.isolate',
'../gin/v8.isolate',
'../third_party/angle/angle.isolate',
],
}
19 changes: 10 additions & 9 deletions content/gpu/gpu_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "base/lazy_instance.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/metrics/statistics_recorder.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
Expand Down Expand Up @@ -215,14 +214,14 @@ int GpuMain(const MainFunctionParams& parameters) {
watchdog_thread->StartWithOptions(options);
}

// Initializes StatisticsRecorder which tracks UMA histograms.
base::StatisticsRecorder::Initialize();

gpu::GPUInfo gpu_info;
// Get vendor_id, device_id, driver_version from browser process through
// commandline switches.
GetGpuInfoFromCommandLine(gpu_info, command_line);

base::TimeDelta collect_context_time;
base::TimeDelta initialize_one_off_time;

// Warm up resources that don't need access to GPUInfo.
if (WarmUpSandbox(command_line)) {
#if defined(OS_LINUX)
Expand Down Expand Up @@ -294,18 +293,15 @@ int GpuMain(const MainFunctionParams& parameters) {
#endif // !defined(OS_CHROMEOS)
#endif // defined(OS_LINUX)
#endif // !defined(OS_MACOSX)
base::TimeDelta collect_context_time =
collect_context_time =
base::TimeTicks::Now() - before_collect_context_graphics_info;
UMA_HISTOGRAM_TIMES("GPU.CollectContextGraphicsInfo",
collect_context_time);
} else { // gl_initialized
VLOG(1) << "gfx::GLSurface::InitializeOneOff failed";
dead_on_arrival = true;
}

base::TimeDelta initialize_one_off_time =
initialize_one_off_time =
base::TimeTicks::Now() - before_initialize_one_off;
UMA_HISTOGRAM_TIMES("GPU.InitializeOneOffTime", initialize_one_off_time);

if (enable_watchdog && delayed_watchdog_enable) {
watchdog_thread = new GpuWatchdogThread(kGpuTimeout);
Expand Down Expand Up @@ -346,6 +342,11 @@ int GpuMain(const MainFunctionParams& parameters) {

GpuProcess gpu_process;

// These UMA must be stored after GpuProcess is constructed as it
// initializes StatisticsRecorder which tracks the histograms.
UMA_HISTOGRAM_TIMES("GPU.CollectContextGraphicsInfo", collect_context_time);
UMA_HISTOGRAM_TIMES("GPU.InitializeOneOffTime", initialize_one_off_time);

GpuChildThread* child_thread = new GpuChildThread(watchdog_thread.get(),
dead_on_arrival,
gpu_info,
Expand Down
1 change: 0 additions & 1 deletion extensions/extensions_browsertests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,5 @@
'includes': [
'../base/base.isolate',
'../gin/v8.isolate',
'../third_party/angle/angle.isolate',
],
}
1 change: 0 additions & 1 deletion gpu/gpu_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,5 @@
],
'includes': [
'../base/base.isolate',
'../third_party/angle/angle.isolate',
],
}
40 changes: 1 addition & 39 deletions tools/metrics/histograms/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10861,22 +10861,6 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary>
</histogram>

<histogram name="GPU.ANGLE.D3D11InitializeResult" enum="D3D11InitializeResult">
<owner>jmadill@chromium.org</owner>
<summary>
The result from initializing a D3D11 device in ANGLE. Can be success, or one
of several error codes which indicate different reasons for failing.
</summary>
</histogram>

<histogram name="GPU.ANGLE.D3D9InitializeResult" enum="D3D9InitializeResult">
<owner>jmadill@chromium.org</owner>
<summary>
The result from initializing a D3D9 device in ANGLE. Can be success, or one
of several error codes which indicate different reasons for failing.
</summary>
</histogram>

<histogram name="GPU.CollectContextGraphicsInfo" units="microseconds">
<owner>vangelis@chromium.org</owner>
<summary>
Expand All @@ -10898,8 +10882,7 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<owner>jmadill@chromium.org</owner>
<summary>
ANGLE's currently active D3D shader model version. Logged once every startup
of the GPU process, on Windows only. Note that Shader Models 2 and 3 map to
D3D9 with ANGLE, and 4+ map to D3D11 ANGLE.
of the GPU process, on Windows only.
</summary>
</histogram>

Expand Down Expand Up @@ -46074,27 +46057,6 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<int value="2" label="Has enough SCTs"/>
</enum>

<enum name="D3D11InitializeResult" type="int">
<int value="0" label="Success"/>
<int value="1" label="Error initializing compiler"/>
<int value="2" label="Missing DLL dependency"/>
<int value="3" label="D3D11CreateDevice returned E_INVALIDARG"/>
<int value="4" label="D3D11CreateDevice returned other error"/>
<int value="5" label="DXGI version not supported"/>
<int value="6" label="Other initialization error"/>
</enum>

<enum name="D3D9InitializeResult" type="int">
<int value="0" label="Success"/>
<int value="1" label="Error initializing compiler"/>
<int value="2" label="Missing DLL dependency"/>
<int value="3" label="Error creating device"/>
<int value="4" label="Shader version not supported"/>
<int value="5" label="StretchRect from textures not supported"/>
<int value="6" label="Device lost of out-of-memory error"/>
<int value="7" label="Other initialization error"/>
</enum>

<enum name="DailyEventIntervalType" type="int">
<int value="0" label="First Run"/>
<int value="1" label="Day Elapsed"/>
Expand Down
4 changes: 0 additions & 4 deletions ui/gl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ component("gl") {
}
if (is_win) {
sources += [
"angle_platform_impl.cc",
"angle_platform_impl.h",
"gl_bindings_autogen_wgl.cc",
"gl_bindings_autogen_wgl.h",
"gl_context_wgl.cc",
Expand All @@ -197,8 +195,6 @@ component("gl") {
"gl_wgl_api_implementation.h",
]

deps += [ "//third_party/angle:libGLESv2" ]

libs = [ "dwmapi.lib" ]
ldflags = [ "/DELAYLOAD:dwmapi.dll" ]
}
Expand Down
6 changes: 1 addition & 5 deletions ui/gl/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,5 @@ specific_include_rules = {
# get access to desktop OpenGL.
"gl_surface_osmesa.cc": [
"+third_party/mesa/src/include/GL/osmesa.h",
],
# Allow us to include ANGLE's base platform implementation.
"angle_platform_impl.h": [
"+third_party/angle/include/platform/Platform.h",
],
]
}
50 changes: 0 additions & 50 deletions ui/gl/angle_platform_impl.cc

This file was deleted.

39 changes: 0 additions & 39 deletions ui/gl/angle_platform_impl.h

This file was deleted.

7 changes: 0 additions & 7 deletions ui/gl/gl.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@
}],
['OS=="win"', {
'sources': [
'angle_platform_impl.cc',
'angle_platform_impl.h',
'gl_bindings_autogen_wgl.cc',
'gl_bindings_autogen_wgl.h',
'gl_context_wgl.cc',
Expand All @@ -199,11 +197,6 @@
'gl_wgl_api_implementation.cc',
'gl_wgl_api_implementation.h',
],
'dependencies': [
# TODO(jmadill): Use ANGLE on other platforms.
'<(angle_path)/src/angle.gyp:libEGL',
'<(angle_path)/src/angle.gyp:libGLESv2',
],
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
Expand Down
14 changes: 0 additions & 14 deletions ui/gl/gl_implementation_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/native_library.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_event.h"
#include "base/win/windows_version.h"
// TODO(jmadill): Apply to all platforms eventually
#include "ui/gl/angle_platform_impl.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context_stub_with_extensions.h"
#include "ui/gl/gl_egl_api_implementation.h"
Expand Down Expand Up @@ -100,10 +97,6 @@ typedef void (__stdcall *SetTraceFunctionPointersFunc)(
GetCategoryEnabledFlagFunc get_category_enabled_flag,
AddTraceEventFunc add_trace_event_func);

// TODO(jmadill): Apply to all platforms eventually
base::LazyInstance<ANGLEPlatformImpl> g_angle_platform_impl =
LAZY_INSTANCE_INITIALIZER;

} // namespace

void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) {
Expand All @@ -118,10 +111,6 @@ bool InitializeStaticGLBindings(GLImplementation implementation) {
// later switch to another GL implementation.
DCHECK_EQ(kGLImplementationNone, GetGLImplementation());

// Init ANGLE platform here, before we call GetPlatformDisplay().
// TODO(jmadill): Apply to all platforms eventually
angle::Platform::initialize(&g_angle_platform_impl.Get());

// Allow the main thread or another to initialize these bindings
// after instituting restrictions on I/O. Going forward they will
// likely be used in the browser process on most platforms. The
Expand Down Expand Up @@ -359,9 +348,6 @@ void InitializeDebugGLBindings() {
}

void ClearGLBindings() {
// TODO(jmadill): Apply to all platforms eventually
angle::Platform::shutdown();

ClearGLBindingsEGL();
ClearGLBindingsGL();
ClearGLBindingsOSMESA();
Expand Down

0 comments on commit 49f1920

Please sign in to comment.