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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 470233003: Restrict ETC1 power-of-two rounding to old IMG drivers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 3ca74a2b23d5a44eecab17c5d8468df58e0698ea..3a55190685aa9e9583d3b1f5a6b31406dc90be10 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -539,22 +539,26 @@ scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface(
DCHECK(window_);
DCHECK(surface_id_);
- scoped_refptr<ContextProviderCommandBuffer> context_provider;
BrowserGpuChannelHostFactory* factory =
BrowserGpuChannelHostFactory::instance();
scoped_refptr<GpuChannelHost> gpu_channel_host = factory->GetGpuChannel();
if (gpu_channel_host && !gpu_channel_host->IsLost()) {
- context_provider = ContextProviderCommandBuffer::Create(
+ context_provider_ = ContextProviderCommandBuffer::Create(
no sievers 2014/08/21 23:02:50 Is there a way we can pass this through without ha
aelias_OOO_until_Jul13 2014/08/23 01:28:50 Done, I took the OutputSurfaceWithoutParent approa
CreateGpuProcessViewContext(gpu_channel_host, attrs, surface_id_),
"BrowserCompositor");
}
- if (!context_provider.get()) {
+ if (!context_provider_.get()) {
LOG(ERROR) << "Failed to create 3D context for compositor.";
return scoped_ptr<cc::OutputSurface>();
}
return scoped_ptr<cc::OutputSurface>(
- new OutputSurfaceWithoutParent(context_provider));
+ new OutputSurfaceWithoutParent(context_provider_));
+}
+
+void CompositorImpl::DidInitializeOutputSurface() {
+ ui_resource_provider_.SetSupportsETC1NonPowerOfTwo(
+ context_provider_->ContextCapabilities().gpu.texture_format_etc1_npot);
}
void CompositorImpl::OnLostResources() {

Powered by Google App Engine
This is Rietveld 408576698