diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-18 11:19:24 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-18 15:15:24 -0800 |
commit | 9c26f063187b129218910dbb86eb21215a2cdf40 (patch) | |
tree | 189f84f90cef341a0a084fefde40f4f07da117cb /src/mbgl/renderer/bucket.hpp | |
parent | 7b39ce95210ceb6640b3a3399dacd1d0e826ac1f (diff) | |
download | qtlocation-mapboxgl-9c26f063187b129218910dbb86eb21215a2cdf40.tar.gz |
[core] Thread GLObjectStore through to Holder objects
This eliminates the reliance on ThreadContext to provide GLObjectStore, and statically enforces that GL cleanup functions happen only when GLObjectStore::performCleanup is called.
With the elimination of the Map thread, this becomes important because there may be multiple GLObjectStore's per-thread, and Map will need to ensure that the correct context is active when calling GLObjectStore::performCleanup.
Diffstat (limited to 'src/mbgl/renderer/bucket.hpp')
-rw-r--r-- | src/mbgl/renderer/bucket.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mbgl/renderer/bucket.hpp b/src/mbgl/renderer/bucket.hpp index e50345d0eb..85f97688dd 100644 --- a/src/mbgl/renderer/bucket.hpp +++ b/src/mbgl/renderer/bucket.hpp @@ -18,13 +18,17 @@ class StyleLayer; class TileID; class CollisionTile; +namespace gl { +class GLObjectStore; +} + class Bucket : private util::noncopyable { public: Bucket() : uploaded(false) {} // As long as this bucket has a Prepare render pass, this function is getting called. Typically, // this only happens once when the bucket is being rendered for the first time. - virtual void upload() = 0; + virtual void upload(gl::GLObjectStore&) = 0; // Every time this bucket is getting rendered, this function is called. This happens either // once or twice (for Opaque and Transparent render passes). |