Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Apr 15, 2016
1 parent 12471d8 commit e3a4a03
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions include/mbgl/util/run_loop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class RunLoop : private util::noncopyable {

// Post the cancellable work fn(args...) to this RunLoop.
template <class Fn, class... Args>
std::unique_ptr<AsyncRequest>
std::unique_ptr<WorkRequest>
invokeCancellable(Fn&& fn, Args&&... args) {
auto flag = std::make_shared<std::atomic<bool>>();
*flag = false;
Expand All @@ -79,7 +79,7 @@ class RunLoop : private util::noncopyable {

// Invoke fn(args...) on this RunLoop, then invoke callback(results...) on the current RunLoop.
template <class Fn, class Cb, class... Args>
std::unique_ptr<AsyncRequest>
std::unique_ptr<WorkRequest>
invokeWithCallback(Fn&& fn, Cb&& callback, Args&&... args) {
auto flag = std::make_shared<std::atomic<bool>>();
*flag = false;
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/source/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@ TileData::State Source::addTile(const TileID& tileID, const StyleUpdateParameter

// If we don't find working tile data, we're just going to load it.
if (type == SourceType::Raster) {
newTile->data = std::make_shared<RasterTileData>(new RasterTileData{
newTile->data = std::shared_ptr<RasterTileData>(new RasterTileData(
normalizedID,
parameters.pixelRatio,
info->tiles.at(0),
parameters.texturePool,
parameters.worker,
parameters.fileSource,
callback
}, [this](TileData* data) { tileDataDeleter.add(data); });
), [this](TileData* data) { tileDataDeleter.add(data); });
} else {
std::unique_ptr<GeometryTileMonitor> monitor;

Expand Down
3 changes: 2 additions & 1 deletion src/mbgl/tile/raster_tile_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace mbgl {

class FileSource;
class AsyncRequest;
class WorkRequest;
class StyleLayer;
namespace gl { class TexturePool; }

Expand All @@ -31,7 +32,7 @@ class RasterTileData : public TileData {
Worker& worker;
std::unique_ptr<AsyncRequest> req;
std::unique_ptr<Bucket> bucket;
std::unique_ptr<AsyncRequest> workRequest;
std::unique_ptr<WorkRequest> workRequest;
};

} // namespace mbgl
Expand Down
3 changes: 2 additions & 1 deletion src/mbgl/tile/vector_tile_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace mbgl {

class Style;
class AsyncRequest;
class WorkRequest;
class GeometryTileMonitor;

class VectorTileData : public TileData {
Expand Down Expand Up @@ -44,7 +45,7 @@ class VectorTileData : public TileData {

std::unique_ptr<GeometryTileMonitor> monitor;
std::unique_ptr<AsyncRequest> tileRequest;
std::unique_ptr<AsyncRequest> workRequest;
std::unique_ptr<WorkRequest> workRequest;

// Contains all the Bucket objects for the tile. Buckets are render
// objects and they get added by tile parsing operations.
Expand Down
2 changes: 1 addition & 1 deletion src/mbgl/util/thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Thread {

// Invoke object->fn(args...) in the runloop thread, then invoke callback(result) in the current thread.
template <typename Fn, class Cb, class... Args>
std::unique_ptr<AsyncRequest>
std::unique_ptr<WorkRequest>
invokeWithCallback(Fn fn, Cb&& callback, Args&&... args) {
return loop->invokeWithCallback(bind(fn), callback, std::forward<Args>(args)...);
}
Expand Down
8 changes: 4 additions & 4 deletions src/mbgl/util/worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Worker::Worker(std::size_t count) {

Worker::~Worker() = default;

std::unique_ptr<AsyncRequest>
std::unique_ptr<WorkRequest>
Worker::parseRasterTile(std::unique_ptr<RasterBucket> bucket,
const std::shared_ptr<const std::string> data,
std::function<void(RasterTileParseResult)> callback) {
Expand All @@ -77,7 +77,7 @@ Worker::parseRasterTile(std::unique_ptr<RasterBucket> bucket,
data);
}

std::unique_ptr<AsyncRequest>
std::unique_ptr<WorkRequest>
Worker::parseGeometryTile(TileWorker& worker,
std::vector<std::unique_ptr<StyleLayer>> layers,
std::unique_ptr<GeometryTile> tile,
Expand All @@ -88,7 +88,7 @@ Worker::parseGeometryTile(TileWorker& worker,
std::move(layers), std::move(tile), config);
}

std::unique_ptr<AsyncRequest>
std::unique_ptr<WorkRequest>
Worker::parsePendingGeometryTileLayers(TileWorker& worker,
PlacementConfig config,
std::function<void(TileParseResult)> callback) {
Expand All @@ -97,7 +97,7 @@ Worker::parsePendingGeometryTileLayers(TileWorker& worker,
callback, &worker, config);
}

std::unique_ptr<AsyncRequest>
std::unique_ptr<WorkRequest>
Worker::redoPlacement(TileWorker& worker,
const std::unordered_map<std::string, std::unique_ptr<Bucket>>& buckets,
PlacementConfig config,
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/util/worker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace mbgl {

class AsyncRequest;
class WorkRequest;
class RasterBucket;
class GeometryTileLoader;

Expand All @@ -33,7 +33,7 @@ class Worker : public mbgl::util::noncopyable {
// bind references to itself, and if and when those lambdas execute, the references
// will still be valid.

using Request = std::unique_ptr<AsyncRequest>;
using Request = std::unique_ptr<WorkRequest>;

Request parseRasterTile(std::unique_ptr<RasterBucket> bucket,
std::shared_ptr<const std::string> data,
Expand Down

0 comments on commit e3a4a03

Please sign in to comment.