Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: cc/resources/resource_provider.h

Issue 14409006: cc: Changes to use GL API for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Add internalformat parameter to CreateImageCHROMIUM in fake_web_graphics_context_3d to fix clang bu… Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index 6f146d916ba64aa3a9cde12c015fece97e6b66a4..b4c8c92f6105caac1018e115abf9098bbc3adfec 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -292,6 +292,22 @@ class CC_EXPORT ResourceProvider {
bool DidSetPixelsComplete(ResourceId id);
void AbortSetPixels(ResourceId id);
+ // Acquire and release an image. The image allows direct
+ // manipulation of texture memory.
+ void AcquireImage(ResourceId id);
+ void ReleaseImage(ResourceId id);
+
+ // Maps the acquired image so that its pixels could be modified.
+ // Unmap is called when all pixels are set.
+ uint8_t* MapImage(ResourceId id);
+ void UnmapImage(ResourceId id);
+
+ // Binds the image to a texture.
+ void BindImage(ResourceId id);
+
+ // Returns the stride for the image.
+ int GetImageStride(ResourceId id);
+
// For tests only! This prevents detecting uninitialized reads.
// Use SetPixels or LockForWrite to allocate implicitly.
void AllocateForTesting(ResourceId id);
@@ -347,6 +363,7 @@ class CC_EXPORT ResourceProvider {
GLenum format;
// TODO(skyostil): Use a separate sampler object for filter state.
GLenum filter;
+ unsigned image_id;
ResourceType type;
};
typedef base::hash_map<ResourceId, Resource> ResourceMap;
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698