Index: cc/gl_renderer.cc |
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc |
index e6253626ba0a612a41b3190ef762aea31a3e9d86..f1d1ba92142b45c9ed8382124a6324b14f7f1a49 100644 |
--- a/cc/gl_renderer.cc |
+++ b/cc/gl_renderer.cc |
@@ -13,7 +13,6 @@ |
#include "cc/geometry_binding.h" |
#include "cc/layer_quad.h" |
#include "cc/math_util.h" |
-#include "cc/platform_color.h" |
#include "cc/priority_calculator.h" |
#include "cc/proxy.h" |
#include "cc/render_pass.h" |
@@ -62,7 +61,7 @@ bool needsIOSurfaceReadbackWorkaround() |
scoped_ptr<GLRenderer> GLRenderer::create(RendererClient* client, ResourceProvider* resourceProvider) |
{ |
scoped_ptr<GLRenderer> renderer(make_scoped_ptr(new GLRenderer(client, resourceProvider))); |
- if (!renderer->initialize()) |
+ if (!renderer->initialize(resourceProvider)) |
return scoped_ptr<GLRenderer>(); |
return renderer.Pass(); |
@@ -83,7 +82,7 @@ GLRenderer::GLRenderer(RendererClient* client, ResourceProvider* resourceProvide |
DCHECK(m_context); |
} |
-bool GLRenderer::initialize() |
+bool GLRenderer::initialize(ResourceProvider* resourceProvider) |
piman
2012/12/07 22:37:35
why? (you already have it).
danakj
2012/12/07 22:41:01
The provider isn't saved, right? Just the context3
piman
2012/12/07 22:53:13
It is saved in the DirectRenderer, that's the one
danakj
2012/12/07 22:54:12
OH >_< I copied and pasted and didn't notice the m
|
{ |
if (!m_context->makeContextCurrent()) |
return false; |
@@ -123,8 +122,8 @@ bool GLRenderer::initialize() |
m_capabilities.usingEglImage = extensions.count("GL_OES_EGL_image_external"); |
- GLC(m_context, m_context->getIntegerv(GL_MAX_TEXTURE_SIZE, &m_capabilities.maxTextureSize)); |
- m_capabilities.bestTextureFormat = PlatformColor::bestTextureFormat(m_context, extensions.count("GL_EXT_texture_format_BGRA8888")); |
+ m_capabilities.maxTextureSize = m_resourceProvider->maxTextureSize(); |
+ m_capabilities.bestTextureFormat = m_resourceProvider->bestTextureFormat(); |
// The updater can access textures while the GLRenderer is using them. |
m_capabilities.allowPartialTextureUpdates = true; |