Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: gpu/ipc/common/struct_traits_unittest.cc

Issue 2881813002: Revert of gpu: GPU service scheduler. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/ipc/common/gpu_stream_constants.h ('k') | gpu/ipc/service/gpu_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "gpu/config/gpu_feature_type.h" 9 #include "gpu/config/gpu_feature_type.h"
10 #include "gpu/ipc/common/gpu_feature_info.mojom.h" 10 #include "gpu/ipc/common/gpu_feature_info.mojom.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 EXPECT_EQ(max_resolution, output.max_resolution); 423 EXPECT_EQ(max_resolution, output.max_resolution);
424 EXPECT_EQ(max_framerate_numerator, output.max_framerate_numerator); 424 EXPECT_EQ(max_framerate_numerator, output.max_framerate_numerator);
425 EXPECT_EQ(max_framerate_denominator, output.max_framerate_denominator); 425 EXPECT_EQ(max_framerate_denominator, output.max_framerate_denominator);
426 } 426 }
427 427
428 TEST_F(StructTraitsTest, GpuPreferences) { 428 TEST_F(StructTraitsTest, GpuPreferences) {
429 GpuPreferences prefs; 429 GpuPreferences prefs;
430 prefs.single_process = true; 430 prefs.single_process = true;
431 prefs.in_process_gpu = true; 431 prefs.in_process_gpu = true;
432 prefs.ui_prioritize_in_gpu_process = true; 432 prefs.ui_prioritize_in_gpu_process = true;
433 prefs.enable_gpu_scheduler = true;
434 #if defined(OS_WIN) 433 #if defined(OS_WIN)
435 const GpuPreferences::VpxDecodeVendors vendor = 434 const GpuPreferences::VpxDecodeVendors vendor =
436 GpuPreferences::VPX_VENDOR_AMD; 435 GpuPreferences::VPX_VENDOR_AMD;
437 prefs.enable_accelerated_vpx_decode = vendor; 436 prefs.enable_accelerated_vpx_decode = vendor;
438 #endif 437 #endif
439 prefs.enable_gpu_driver_debug_logging = true; 438 prefs.enable_gpu_driver_debug_logging = true;
440 439
441 mojom::TraitsTestServicePtr proxy = GetTraitsTestProxy(); 440 mojom::TraitsTestServicePtr proxy = GetTraitsTestProxy();
442 GpuPreferences echo; 441 GpuPreferences echo;
443 proxy->EchoGpuPreferences(prefs, &echo); 442 proxy->EchoGpuPreferences(prefs, &echo);
444 EXPECT_TRUE(echo.single_process); 443 EXPECT_TRUE(echo.single_process);
445 EXPECT_TRUE(echo.in_process_gpu); 444 EXPECT_TRUE(echo.in_process_gpu);
446 EXPECT_TRUE(echo.ui_prioritize_in_gpu_process); 445 EXPECT_TRUE(echo.ui_prioritize_in_gpu_process);
447 EXPECT_TRUE(echo.enable_gpu_scheduler);
448 EXPECT_TRUE(echo.enable_gpu_driver_debug_logging); 446 EXPECT_TRUE(echo.enable_gpu_driver_debug_logging);
449 #if defined(OS_WIN) 447 #if defined(OS_WIN)
450 EXPECT_EQ(vendor, echo.enable_accelerated_vpx_decode); 448 EXPECT_EQ(vendor, echo.enable_accelerated_vpx_decode);
451 #endif 449 #endif
452 } 450 }
453 451
454 TEST_F(StructTraitsTest, GpuFeatureInfo) { 452 TEST_F(StructTraitsTest, GpuFeatureInfo) {
455 GpuFeatureInfo input; 453 GpuFeatureInfo input;
456 input.status_values[GPU_FEATURE_TYPE_FLASH3D] = 454 input.status_values[GPU_FEATURE_TYPE_FLASH3D] =
457 gpu::kGpuFeatureStatusBlacklisted; 455 gpu::kGpuFeatureStatusBlacklisted;
458 input.status_values[GPU_FEATURE_TYPE_PANEL_FITTING] = 456 input.status_values[GPU_FEATURE_TYPE_PANEL_FITTING] =
459 gpu::kGpuFeatureStatusUndefined; 457 gpu::kGpuFeatureStatusUndefined;
460 input.status_values[GPU_FEATURE_TYPE_GPU_RASTERIZATION] = 458 input.status_values[GPU_FEATURE_TYPE_GPU_RASTERIZATION] =
461 gpu::kGpuFeatureStatusDisabled; 459 gpu::kGpuFeatureStatusDisabled;
462 460
463 GpuFeatureInfo output; 461 GpuFeatureInfo output;
464 ASSERT_TRUE(mojom::GpuFeatureInfo::Deserialize( 462 ASSERT_TRUE(mojom::GpuFeatureInfo::Deserialize(
465 mojom::GpuFeatureInfo::Serialize(&input), &output)); 463 mojom::GpuFeatureInfo::Serialize(&input), &output));
466 EXPECT_TRUE(std::equal(input.status_values, 464 EXPECT_TRUE(std::equal(input.status_values,
467 input.status_values + NUMBER_OF_GPU_FEATURE_TYPES, 465 input.status_values + NUMBER_OF_GPU_FEATURE_TYPES,
468 output.status_values)); 466 output.status_values));
469 } 467 }
470 468
471 } // namespace gpu 469 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/common/gpu_stream_constants.h ('k') | gpu/ipc/service/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698