summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authordcastagna <dcastagna@chromium.org>2015-10-19 13:17:35 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-19 20:18:15 +0000
commit7f45dadaad0318020e4498b56a1689d0af5de8c8 (patch)
tree16a3ec0ac454a6b63daed251a5b69fc8e62287c1 /cc
parentde5c3d3116f445c3a8528eb32fade4f76b2d0c00 (diff)
downloadchromium_src-7f45dadaad0318020e4498b56a1689d0af5de8c8.zip
chromium_src-7f45dadaad0318020e4498b56a1689d0af5de8c8.tar.gz
chromium_src-7f45dadaad0318020e4498b56a1689d0af5de8c8.tar.bz2
media: Use GL shared worker context instead of allocating one.
Media used to create its own GL context. This context, that takes up a few MBs of memory, was used to create textures, mailboxes and syncpoints. This CL replaces the media context with the shared worker context already present in RenderThreadImpl. It also makes sure that media drops any reference to it in the main thread (that's required by the shared worker context.) This change will also allow media to access the context in a worker thread, in this way the GL operations won't need to be serialized on the media thread that might be busy decoding video/audio. NOTE: media didn't handle GL context lost properly, but simply stopped working after the first context lost. This CL doesn't fix that and reproduces the same behavior. BUG=544547 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1369843002 Cr-Commit-Position: refs/heads/master@{#354848}
Diffstat (limited to 'cc')
-rw-r--r--cc/output/context_provider.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/output/context_provider.h b/cc/output/context_provider.h
index 64fd233..ebb98e5 100644
--- a/cc/output/context_provider.h
+++ b/cc/output/context_provider.h
@@ -94,6 +94,7 @@ class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> {
// A method to be called from the main thread that should return true if
// the context inside the provider is no longer valid.
+ // TODO(dcastagna): This is no longer needed and can be removed.
virtual bool DestroyedOnMainThread() = 0;
// Sets a callback to be called when the context is lost. This should be