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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 1703163002: Remove dependency on GURL from content/common/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index a696ecc44e6dc71e87b1a3b5f57cbd8ff3388c88..43ebadc14202ee94716ccedabe65cf9d0adf7b98 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -824,20 +824,19 @@ void GpuProcessHost::OnGpuMemoryBufferCreated(
callback.Run(handle);
}
-void GpuProcessHost::OnDidCreateOffscreenContext(const GURL& url) {
- urls_with_live_offscreen_contexts_.insert(url);
+void GpuProcessHost::OnDidCreateOffscreenContext(const std::string& url) {
+ urls_with_live_offscreen_contexts_.insert(GURL(url));
}
void GpuProcessHost::OnDidLoseContext(bool offscreen,
gpu::error::ContextLostReason reason,
- const GURL& url) {
+ const std::string& url) {
+ const GURL gurl(url);
// TODO(kbr): would be nice to see the "offscreen" flag too.
- TRACE_EVENT2("gpu", "GpuProcessHost::OnDidLoseContext",
- "reason", reason,
- "url",
- url.possibly_invalid_spec());
+ TRACE_EVENT2("gpu", "GpuProcessHost::OnDidLoseContext", "reason", reason,
+ "url", gurl.possibly_invalid_spec());
- if (!offscreen || url.is_empty()) {
+ if (!offscreen || gurl.is_empty()) {
// Assume that the loss of the compositor's or accelerated canvas'
// context is a serious event and blame the loss on all live
// offscreen contexts. This more robustly handles situations where
@@ -862,11 +861,11 @@ void GpuProcessHost::OnDidLoseContext(bool offscreen,
return;
}
- GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs(url, guilt);
+ GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs(gurl, guilt);
piman 2016/02/18 18:29:28 Oh, I hadn't realized we used the URL to extract t
Mark Dittmer 2016/02/18 21:10:25 If GURL is stored on either end, and spec() is use
}
-void GpuProcessHost::OnDidDestroyOffscreenContext(const GURL& url) {
- urls_with_live_offscreen_contexts_.erase(url);
+void GpuProcessHost::OnDidDestroyOffscreenContext(const std::string& url) {
+ urls_with_live_offscreen_contexts_.erase(GURL(url));
}
void GpuProcessHost::OnGpuMemoryUmaStatsReceived(

Powered by Google App Engine
This is Rietveld 408576698