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

Unified Diff: cc/resources/resource_provider.h

Issue 485043003: cc: Use correct message loop proxy in BlockingTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 6 years, 4 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
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index b6c560d5e2562d8490a3130124df3e75404c7ce9..12e54baed075c66e90b3ee0c41ae1563f01bb7d4 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -21,11 +21,11 @@
#include "cc/output/context_provider.h"
#include "cc/output/output_surface.h"
#include "cc/resources/raster_buffer.h"
-#include "cc/resources/release_callback.h"
+#include "cc/resources/release_callback_impl.h"
#include "cc/resources/resource_format.h"
#include "cc/resources/return_callback.h"
#include "cc/resources/shared_bitmap.h"
-#include "cc/resources/single_release_callback.h"
+#include "cc/resources/single_release_callback_impl.h"
#include "cc/resources/texture_mailbox.h"
#include "cc/resources/transferable_resource.h"
#include "third_party/khronos/GLES2/gl2.h"
@@ -48,6 +48,7 @@ class Vector2d;
}
namespace cc {
+class BlockingTaskRunner;
class IdAllocator;
class SharedBitmap;
class SharedBitmapManager;
@@ -77,6 +78,7 @@ class CC_EXPORT ResourceProvider {
static scoped_ptr<ResourceProvider> Create(
OutputSurface* output_surface,
SharedBitmapManager* shared_bitmap_manager,
+ BlockingTaskRunner* blocking_main_thread_task_runner,
int highp_threshold_min,
bool use_rgba_4444_texture_format,
size_t id_allocation_chunk_size,
@@ -137,7 +139,7 @@ class CC_EXPORT ResourceProvider {
// Wraps an external texture mailbox into a GL resource.
ResourceId CreateResourceFromTextureMailbox(
const TextureMailbox& mailbox,
- scoped_ptr<SingleReleaseCallback> release_callback);
+ scoped_ptr<SingleReleaseCallbackImpl> release_callback_impl);
void DeleteResource(ResourceId id);
@@ -372,6 +374,10 @@ class CC_EXPORT ResourceProvider {
static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl);
+ BlockingTaskRunner* blocking_main_thread_task_runner() const {
danakj 2014/09/03 16:09:36 remove this
Sami 2014/09/03 17:59:12 Done.
+ return blocking_main_thread_task_runner_;
+ }
+
private:
class GpuRasterBuffer;
class ImageRasterBuffer;
@@ -412,7 +418,7 @@ class CC_EXPORT ResourceProvider {
// Query used to determine when read lock fence has passed.
unsigned gl_read_lock_query_id;
TextureMailbox mailbox;
- ReleaseCallback release_callback;
+ ReleaseCallbackImpl release_callback_impl;
uint8_t* pixels;
int lock_for_read_count;
int imported_count;
@@ -536,6 +542,7 @@ class CC_EXPORT ResourceProvider {
ResourceProvider(OutputSurface* output_surface,
SharedBitmapManager* shared_bitmap_manager,
+ BlockingTaskRunner* blocking_main_thread_task_runner,
int highp_threshold_min,
bool use_rgba_4444_texture_format,
size_t id_allocation_chunk_size,
@@ -599,6 +606,7 @@ class CC_EXPORT ResourceProvider {
OutputSurface* output_surface_;
SharedBitmapManager* shared_bitmap_manager_;
+ BlockingTaskRunner* blocking_main_thread_task_runner_;
bool lost_output_surface_;
int highp_threshold_min_;
ResourceId next_id_;

Powered by Google App Engine
This is Rietveld 408576698