summaryrefslogtreecommitdiffstats
path: root/cc/output/delegating_renderer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/output/delegating_renderer.cc')
-rw-r--r--cc/output/delegating_renderer.cc39
1 files changed, 6 insertions, 33 deletions
diff --git a/cc/output/delegating_renderer.cc b/cc/output/delegating_renderer.cc
index eae6f30..799ca83 100644
--- a/cc/output/delegating_renderer.cc
+++ b/cc/output/delegating_renderer.cc
@@ -75,41 +75,14 @@ bool DelegatingRenderer::Initialize() {
context3d);
context3d->pushGroupMarkerEXT(unique_context_name.c_str());
- std::string extensions_string =
- UTF16ToASCII(context3d->getString(GL_EXTENSIONS));
-
- std::vector<std::string> extensions;
- base::SplitString(extensions_string, ' ', &extensions);
-
- // TODO(danakj): We need non-GPU-specific paths for these things. This
- // renderer shouldn't need to use context3d extensions directly.
- bool has_set_visibility = false;
- bool has_io_surface = false;
- bool has_arb_texture_rect = false;
- bool has_egl_image = false;
- bool has_map_image = false;
- for (size_t i = 0; i < extensions.size(); ++i) {
- if (extensions[i] == "GL_CHROMIUM_set_visibility") {
- has_set_visibility = true;
- } else if (extensions[i] == "GL_CHROMIUM_iosurface") {
- has_io_surface = true;
- } else if (extensions[i] == "GL_ARB_texture_rectangle") {
- has_arb_texture_rect = true;
- } else if (extensions[i] == "GL_OES_EGL_image_external") {
- has_egl_image = true;
- } else if (extensions[i] == "GL_CHROMIUM_map_image") {
- has_map_image = true;
- }
- }
-
- if (has_io_surface)
- DCHECK(has_arb_texture_rect);
-
- capabilities_.using_set_visibility = has_set_visibility;
+ const ContextProvider::Capabilities& caps =
+ output_surface_->context_provider()->ContextCapabilities();
- capabilities_.using_egl_image = has_egl_image;
+ DCHECK(!caps.iosurface || caps.texture_rectangle);
- capabilities_.using_map_image = has_map_image;
+ capabilities_.using_set_visibility = caps.set_visibility;
+ capabilities_.using_egl_image = caps.egl_image_external;
+ capabilities_.using_map_image = caps.map_image;
return true;
}