forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collect GL strings on Cast through CastContentGpuClient.
BUG=744658 TEST=bots R=halliwell@chromium.org,piman@chromium.org,kbr@chromium.org Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: Ib8e4e5e874025d78c7cdc2cc3b7af6c9e20ca9c4 Reviewed-on: https://chromium-review.googlesource.com/874612 Commit-Queue: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Stephen Lanham <slan@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Luke Halliwell <halliwell@chromium.org> Cr-Commit-Position: refs/heads/master@{#530612}
- Loading branch information
Showing
23 changed files
with
171 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2018 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//chromecast/chromecast.gni") | ||
|
||
cast_source_set("gpu") { | ||
sources = [ | ||
"cast_content_gpu_client.cc", | ||
"cast_content_gpu_client.h", | ||
] | ||
|
||
deps = [ | ||
"//base", | ||
"//chromecast/base", | ||
"//chromecast/base:cast_sys_info", | ||
"//chromecast/public", | ||
"//content/public/gpu", | ||
"//gpu/config", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include_rules = [ | ||
"+chromecast/base", | ||
"+chromecast/public", | ||
"+content/public/gpu", | ||
"+gpu/config", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2018 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chromecast/gpu/cast_content_gpu_client.h" | ||
|
||
#include "base/memory/ptr_util.h" | ||
#include "build/build_config.h" | ||
#include "chromecast/base/cast_sys_info_util.h" | ||
#include "chromecast/public/cast_sys_info.h" | ||
#include "gpu/config/gpu_info.h" | ||
#include "gpu/config/gpu_info_collector.h" | ||
|
||
namespace chromecast { | ||
|
||
namespace shell { | ||
|
||
// static | ||
std::unique_ptr<CastContentGpuClient> CastContentGpuClient::Create() { | ||
return base::WrapUnique(new CastContentGpuClient()); | ||
} | ||
|
||
CastContentGpuClient::CastContentGpuClient() = default; | ||
|
||
CastContentGpuClient::~CastContentGpuClient() = default; | ||
|
||
const gpu::GPUInfo* CastContentGpuClient::GetGPUInfo() { | ||
#if defined(OS_ANDROID) | ||
return nullptr; | ||
#else | ||
if (!gpu_info_) { | ||
gpu_info_ = base::MakeUnique<gpu::GPUInfo>(); | ||
std::unique_ptr<CastSysInfo> sys_info = CreateSysInfo(); | ||
gpu_info_->gl_vendor = sys_info->GetGlVendor(); | ||
gpu_info_->gl_renderer = sys_info->GetGlRenderer(); | ||
gpu_info_->gl_version = sys_info->GetGlVersion(); | ||
gpu::CollectDriverInfoGL(gpu_info_.get()); | ||
} | ||
return gpu_info_.get(); | ||
#endif // OS_ANDROID | ||
} | ||
|
||
} // namespace shell | ||
} // namespace chromecast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright 2018 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROMECAST_GPU_CAST_CONTENT_GPU_CLIENT_H_ | ||
#define CHROMECAST_GPU_CAST_CONTENT_GPU_CLIENT_H_ | ||
|
||
#include <memory> | ||
|
||
#include "base/macros.h" | ||
#include "content/public/gpu/content_gpu_client.h" | ||
|
||
namespace gpu { | ||
struct GPUInfo; | ||
} | ||
|
||
namespace chromecast { | ||
|
||
namespace shell { | ||
|
||
class CastContentGpuClient : public content::ContentGpuClient { | ||
public: | ||
~CastContentGpuClient() override; | ||
|
||
static std::unique_ptr<CastContentGpuClient> Create(); | ||
|
||
// ContentGpuClient: | ||
const gpu::GPUInfo* GetGPUInfo() override; | ||
|
||
protected: | ||
CastContentGpuClient(); | ||
|
||
private: | ||
std::unique_ptr<gpu::GPUInfo> gpu_info_; | ||
|
||
DISALLOW_COPY_AND_ASSIGN(CastContentGpuClient); | ||
}; | ||
|
||
} // namespace shell | ||
} // namespace chromecast | ||
|
||
#endif // CHROMECAST_GPU_CAST_CONTENT_GPU_CLIENT_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.