OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/gpu/gpu_internals_ui.h" | 5 #include "content/browser/gpu/gpu_internals_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 manager->IsFeatureBlacklisted( | 329 manager->IsFeatureBlacklisted( |
330 gpu::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE) && | 330 gpu::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE) && |
331 !IsForceCompositingModeEnabled(), | 331 !IsForceCompositingModeEnabled(), |
332 !IsForceCompositingModeEnabled() && | 332 !IsForceCompositingModeEnabled() && |
333 !manager->IsFeatureBlacklisted( | 333 !manager->IsFeatureBlacklisted( |
334 gpu::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE), | 334 gpu::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE), |
335 "Force compositing mode is off, either disabled at the command" | 335 "Force compositing mode is off, either disabled at the command" |
336 " line or not supported by the current system.", | 336 " line or not supported by the current system.", |
337 false | 337 false |
338 }, | 338 }, |
339 { | |
340 "raster", | |
341 false, | |
342 !command_line.HasSwitch(switches::kEnableAcceleratedPainting), | |
343 "Accelerated rasterization has not been enabled or" | |
344 " is not supported by the current system.", | |
345 true | |
346 } | |
347 }; | 339 }; |
348 const size_t kNumFeatures = sizeof(kGpuFeatureInfo) / sizeof(GpuFeatureInfo); | 340 const size_t kNumFeatures = sizeof(kGpuFeatureInfo) / sizeof(GpuFeatureInfo); |
349 | 341 |
350 // Build the feature_status field. | 342 // Build the feature_status field. |
351 { | 343 { |
352 base::ListValue* feature_status_list = new base::ListValue(); | 344 base::ListValue* feature_status_list = new base::ListValue(); |
353 | 345 |
354 for (size_t i = 0; i < kNumFeatures; ++i) { | 346 for (size_t i = 0; i < kNumFeatures; ++i) { |
355 // force_compositing_mode status is part of the compositing status. | 347 // force_compositing_mode status is part of the compositing status. |
356 if (kGpuFeatureInfo[i].name == "force_compositing_mode") | 348 if (kGpuFeatureInfo[i].name == "force_compositing_mode") |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 : WebUIController(web_ui) { | 639 : WebUIController(web_ui) { |
648 web_ui->AddMessageHandler(new GpuMessageHandler()); | 640 web_ui->AddMessageHandler(new GpuMessageHandler()); |
649 | 641 |
650 // Set up the chrome://gpu/ source. | 642 // Set up the chrome://gpu/ source. |
651 BrowserContext* browser_context = | 643 BrowserContext* browser_context = |
652 web_ui->GetWebContents()->GetBrowserContext(); | 644 web_ui->GetWebContents()->GetBrowserContext(); |
653 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 645 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
654 } | 646 } |
655 | 647 |
656 } // namespace content | 648 } // namespace content |
OLD | NEW |