Chromium Code Reviews| Index: cc/output/output_surface.cc |
| diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc |
| index 46096d2e3094febd271e31a47c8668fbc1158ea2..eaef6f369068e25b03db3afc637f77cd56fb2bd6 100644 |
| --- a/cc/output/output_surface.cc |
| +++ b/cc/output/output_surface.cc |
| @@ -107,9 +107,13 @@ void OutputSurface::SetExternalStencilTest(bool enabled) { |
| void OutputSurface::SetExternalDrawConstraints(const gfx::Transform& transform, |
| const gfx::Rect& viewport, |
| const gfx::Rect& clip, |
| + bool resourceless_software_draw, |
| bool valid_for_tile_management) { |
| - client_->SetExternalDrawConstraints( |
| - transform, viewport, clip, valid_for_tile_management); |
| + client_->SetExternalDrawConstraints(transform, |
| + viewport, |
| + clip, |
| + resourceless_software_draw, |
| + valid_for_tile_management); |
| } |
| OutputSurface::~OutputSurface() { |
| @@ -120,8 +124,6 @@ bool OutputSurface::HasExternalStencilTest() const { |
| return external_stencil_test_enabled_; |
| } |
| -bool OutputSurface::ForcedDrawToSoftwareDevice() const { return false; } |
| - |
| bool OutputSurface::BindToClient(OutputSurfaceClient* client) { |
| DCHECK(client); |
| client_ = client; |
| @@ -275,68 +277,6 @@ base::TimeDelta OutputSurface::GpuLatencyEstimate() { |
| void OutputSurface::UpdateAndMeasureGpuLatency() { |
| // http://crbug.com/306690 tracks re-enabling latency queries. |
| -#if 0 |
|
brianderson
2014/07/08 21:26:12
I'm removing this in https://codereview.chromium.o
boliu
2014/07/08 21:31:14
Yeah presubmit wouldn't let me upload if I don't r
|
| - // We only care about GPU latency for surfaces that do not have a parent |
| - // compositor, since surfaces that do have a parent compositor can use |
| - // mailboxes or delegated rendering to send frames to their parent without |
| - // incurring GPU latency. |
| - if (capabilities_.adjust_deadline_for_parent) |
| - return; |
| - |
| - while (pending_gpu_latency_query_ids_.size()) { |
| - unsigned query_id = pending_gpu_latency_query_ids_.front(); |
| - unsigned query_complete = 1; |
| - context_provider_->ContextGL()->GetQueryObjectuivEXT( |
| - query_id, GL_QUERY_RESULT_AVAILABLE_EXT, &query_complete); |
| - if (!query_complete) |
| - break; |
| - |
| - unsigned value = 0; |
| - context_provider_->ContextGL()->GetQueryObjectuivEXT( |
| - query_id, GL_QUERY_RESULT_EXT, &value); |
| - pending_gpu_latency_query_ids_.pop_front(); |
| - available_gpu_latency_query_ids_.push_back(query_id); |
| - |
| - base::TimeDelta latency = base::TimeDelta::FromMicroseconds(value); |
| - base::TimeDelta latency_estimate = GpuLatencyEstimate(); |
| - gpu_latency_history_.InsertSample(latency); |
| - |
| - base::TimeDelta latency_overestimate; |
| - base::TimeDelta latency_underestimate; |
| - if (latency > latency_estimate) |
| - latency_underestimate = latency - latency_estimate; |
| - else |
| - latency_overestimate = latency_estimate - latency; |
| - UMA_HISTOGRAM_CUSTOM_TIMES("Renderer.GpuLatency", |
| - latency, |
| - base::TimeDelta::FromMilliseconds(1), |
| - base::TimeDelta::FromMilliseconds(100), |
| - 50); |
| - UMA_HISTOGRAM_CUSTOM_TIMES("Renderer.GpuLatencyUnderestimate", |
| - latency_underestimate, |
| - base::TimeDelta::FromMilliseconds(1), |
| - base::TimeDelta::FromMilliseconds(100), |
| - 50); |
| - UMA_HISTOGRAM_CUSTOM_TIMES("Renderer.GpuLatencyOverestimate", |
| - latency_overestimate, |
| - base::TimeDelta::FromMilliseconds(1), |
| - base::TimeDelta::FromMilliseconds(100), |
| - 50); |
| - } |
| - |
| - unsigned gpu_latency_query_id; |
| - if (available_gpu_latency_query_ids_.size()) { |
| - gpu_latency_query_id = available_gpu_latency_query_ids_.front(); |
| - available_gpu_latency_query_ids_.pop_front(); |
| - } else { |
| - context_provider_->ContextGL()->GenQueriesEXT(1, &gpu_latency_query_id); |
| - } |
| - |
| - context_provider_->ContextGL()->BeginQueryEXT(GL_LATENCY_QUERY_CHROMIUM, |
| - gpu_latency_query_id); |
| - context_provider_->ContextGL()->EndQueryEXT(GL_LATENCY_QUERY_CHROMIUM); |
| - pending_gpu_latency_query_ids_.push_back(gpu_latency_query_id); |
| -#endif |
| } |
| void OutputSurface::PostSwapBuffersComplete() { |