summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_image_shm.cc
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-19 10:22:56 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-19 10:22:56 +0000
commit8a48e732c0dc67b22f0b2cdce8bf750e273a4628 (patch)
treea3f0260baa264de95d1ffb21815ebcf223dfdee2 /ui/gl/gl_image_shm.cc
parent10ebc9183caa8dd392ec89cc6c571332c4194741 (diff)
downloadchromium_src-8a48e732c0dc67b22f0b2cdce8bf750e273a4628.zip
chromium_src-8a48e732c0dc67b22f0b2cdce8bf750e273a4628.tar.gz
chromium_src-8a48e732c0dc67b22f0b2cdce8bf750e273a4628.tar.bz2
gpu: Add Will/DidUseTexImage to GLImage API.
WillUseTexImage/DidUseTexImage is called before/after the image is used for sampling. The result is that the client only has to call bind/releaseTexImage2D when contents have changed, which allows for more efficient GLImage implementations as work required before use can be separated from work required when contents have changed. BUG=261649 TEST=gpu_unittests --gtest_filter=SharedTextureTest.Images && gpu_unittests --gtest_filter=GLES2DecoderWithShaderTest.UseTexImage && cc_unittests --gtest_filter=ResourceProviderTests/ResourceProviderTest.Image_GLTexture* && gl_tests --gtest_filter=MockGpuMemoryBufferTest.Lifecycle Review URL: https://codereview.chromium.org/23129010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl/gl_image_shm.cc')
-rw-r--r--ui/gl/gl_image_shm.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/ui/gl/gl_image_shm.cc b/ui/gl/gl_image_shm.cc
index 78e8164..5b182eb 100644
--- a/ui/gl/gl_image_shm.cc
+++ b/ui/gl/gl_image_shm.cc
@@ -40,6 +40,13 @@ bool GLImageShm::Initialize(gfx::GpuMemoryBufferHandle buffer) {
return true;
}
+void GLImageShm::Destroy() {
+}
+
+gfx::Size GLImageShm::GetSize() {
+ return size_;
+}
+
bool GLImageShm::BindTexImage() {
TRACE_EVENT0("gpu", "GLImageShm::BindTexImage");
DCHECK(shared_memory_);
@@ -82,14 +89,13 @@ bool GLImageShm::BindTexImage() {
return true;
}
-gfx::Size GLImageShm::GetSize() {
- return size_;
+void GLImageShm::ReleaseTexImage() {
}
-void GLImageShm::Destroy() {
+void GLImageShm::WillUseTexImage() {
}
-void GLImageShm::ReleaseTexImage() {
+void GLImageShm::DidUseTexImage() {
}
} // namespace gfx