Commit da151514 authored by jbates@chromium.org's avatar jbates@chromium.org

Fix frame_rate_tests for Vista.

chrome on Vista uses accelerated canvas even without accelerated compositing. So to force software, we need --disable-accelerated-2d-canvas.

Additionally, to avoid potential flakiness, moved the check from context creation success to actual swap buffers - that way if someone creates a context without drawing, it will not trigger.

BUG=103956

Review URL: http://codereview.chromium.org/8491056

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109727 0039d316-1c4b-4281-b951-d872f2087c98
parent 1dc82ffc
...@@ -99,6 +99,7 @@ class FrameRateTest ...@@ -99,6 +99,7 @@ class FrameRateTest
if (!HasFlag(kUseGpu)) { if (!HasFlag(kUseGpu)) {
launch_arguments_.AppendSwitch(switches::kDisableAcceleratedCompositing); launch_arguments_.AppendSwitch(switches::kDisableAcceleratedCompositing);
launch_arguments_.AppendSwitch(switches::kDisableExperimentalWebGL); launch_arguments_.AppendSwitch(switches::kDisableExperimentalWebGL);
launch_arguments_.AppendSwitch(switches::kDisableAccelerated2dCanvas);
} else { } else {
// This switch is required for enabling the accelerated 2d canvas on // This switch is required for enabling the accelerated 2d canvas on
// Chrome versions prior to Chrome 15, which may be the case for the // Chrome versions prior to Chrome 15, which may be the case for the
...@@ -120,7 +121,7 @@ class FrameRateTest ...@@ -120,7 +121,7 @@ class FrameRateTest
gfx::GLImplementation gl_impl = gfx::kGLImplementationNone; gfx::GLImplementation gl_impl = gfx::kGLImplementationNone;
const TraceEvent* gpu_event = analyzer->FindOneEvent( const TraceEvent* gpu_event = analyzer->FindOneEvent(
Query(EVENT_NAME) == Query::String("GLES2DecoderImpl::Initialize") && Query(EVENT_NAME) == Query::String("SwapBuffers") &&
Query(EVENT_HAS_NUMBER_ARG, "GLImpl")); Query(EVENT_HAS_NUMBER_ARG, "GLImpl"));
if (gpu_event) if (gpu_event)
gl_impl = static_cast<gfx::GLImplementation>( gl_impl = static_cast<gfx::GLImplementation>(
......
...@@ -2062,10 +2062,6 @@ bool GLES2DecoderImpl::Initialize( ...@@ -2062,10 +2062,6 @@ bool GLES2DecoderImpl::Initialize(
return false; return false;
} }
// TRACE_EVENT for gpu tests:
TRACE_EVENT_INSTANT1("test_gpu", "GLES2DecoderImpl::Initialize", "GLImpl",
static_cast<int>(gfx::GetGLImplementation()));
return true; return true;
} }
...@@ -7088,6 +7084,9 @@ error::Error GLES2DecoderImpl::HandleSwapBuffers( ...@@ -7088,6 +7084,9 @@ error::Error GLES2DecoderImpl::HandleSwapBuffers(
uint32 immediate_data_size, const gles2::SwapBuffers& c) { uint32 immediate_data_size, const gles2::SwapBuffers& c) {
bool is_offscreen = !!offscreen_target_frame_buffer_.get(); bool is_offscreen = !!offscreen_target_frame_buffer_.get();
int this_frame_number = frame_number_++; int this_frame_number = frame_number_++;
// TRACE_EVENT for gpu tests:
TRACE_EVENT_INSTANT1("test_gpu", "SwapBuffers",
"GLImpl", static_cast<int>(gfx::GetGLImplementation()));
TRACE_EVENT2("gpu", "GLES2DecoderImpl::HandleSwapBuffers", TRACE_EVENT2("gpu", "GLES2DecoderImpl::HandleSwapBuffers",
"offscreen", is_offscreen, "offscreen", is_offscreen,
"frame", this_frame_number); "frame", this_frame_number);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment