summaryrefslogtreecommitdiffstats
path: root/cc/output
diff options
context:
space:
mode:
authorkaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 06:48:37 +0000
committerkaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 06:48:37 +0000
commit6123930c019a4ab58c419b48aa3ec00491285e64 (patch)
tree5179a9aee56645cd6f854afb5111974f1713e22b /cc/output
parent90416efc49a4abc14dd15b7dcca66157be3fb822 (diff)
downloadchromium_src-6123930c019a4ab58c419b48aa3ec00491285e64.zip
chromium_src-6123930c019a4ab58c419b48aa3ec00491285e64.tar.gz
chromium_src-6123930c019a4ab58c419b48aa3ec00491285e64.tar.bz2
cc: Changes to use GL API for GpuMemoryBuffers
Corresponding gpu changes are here: https://codereview.chromium.org/14456004/ BUG=175012 Review URL: https://chromiumcodereview.appspot.com/14409006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output')
-rw-r--r--cc/output/delegating_renderer.cc30
-rw-r--r--cc/output/gl_renderer.cc4
2 files changed, 22 insertions, 12 deletions
diff --git a/cc/output/delegating_renderer.cc b/cc/output/delegating_renderer.cc
index e3a784e..76093c4 100644
--- a/cc/output/delegating_renderer.cc
+++ b/cc/output/delegating_renderer.cc
@@ -80,22 +80,26 @@ bool DelegatingRenderer::Initialize() {
// TODO(danakj): We need non-GPU-specific paths for these things. This
// renderer shouldn't need to use context3d extensions directly.
- bool has_read_bgra = true;
- bool has_set_visibility = true;
- bool has_io_surface = true;
- bool has_arb_texture_rect = true;
- bool has_egl_image = true;
+ bool has_read_bgra = false;
+ 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_EXT_read_format_bgra")
+ if (extensions[i] == "GL_EXT_read_format_bgra") {
has_read_bgra = true;
- else if (extensions[i] == "GL_CHROMIUM_set_visibility")
+ } else if (extensions[i] == "GL_CHROMIUM_set_visibility") {
has_set_visibility = true;
- else if (extensions[i] == "GL_CHROMIUM_iosurface")
+ } 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_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)
@@ -114,6 +118,8 @@ bool DelegatingRenderer::Initialize() {
capabilities_.using_egl_image = has_egl_image;
+ capabilities_.using_map_image = has_map_image;
+
return true;
}
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index b151e36..15766c4 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -198,6 +198,10 @@ bool GLRenderer::Initialize() {
capabilities_.using_offscreen_context3d = true;
+ capabilities_.using_map_image =
+ extensions.count("GL_CHROMIUM_map_image") > 0 &&
+ Settings().use_map_image;
+
is_using_bind_uniform_ =
extensions.count("GL_CHROMIUM_bind_uniform_location") > 0;