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

Unified Diff: cc/resources/resource_provider.h

Issue 1273163004: Revert of cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « cc/resources/resource_pool_unittest.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 2a778d3e31ed03e710e226643238cb3cbf3d81ca..bee3ce1014a0b1b610203c2d66c7be97077b17c4 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -35,7 +35,6 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/gfx/geometry/size.h"
-#include "ui/gfx/gpu_memory_buffer.h"
class GrContext;
@@ -47,6 +46,7 @@
}
namespace gfx {
+class GpuMemoryBuffer;
class Rect;
class Vector2d;
}
@@ -87,7 +87,8 @@
BlockingTaskRunner* blocking_main_thread_task_runner,
int highp_threshold_min,
bool use_rgba_4444_texture_format,
- size_t id_allocation_chunk_size);
+ size_t id_allocation_chunk_size,
+ bool use_persistent_map_for_gpu_memory_buffers);
~ResourceProvider() override;
void DidLoseOutputSurface() { lost_output_surface_ = true; }
@@ -102,8 +103,8 @@
}
ResourceFormat yuv_resource_format() const { return yuv_resource_format_; }
bool use_sync_query() const { return use_sync_query_; }
- gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() {
- return gpu_memory_buffer_manager_;
+ bool use_persistent_map_for_gpu_memory_buffers() const {
+ return use_persistent_map_for_gpu_memory_buffers_;
}
size_t num_resources() const { return resources_.size(); }
@@ -425,7 +426,14 @@
// Indicates if we can currently lock this resource for write.
bool CanLockForWrite(ResourceId id);
+ // Copy |rect| pixels from source to destination.
+ void CopyResource(ResourceId source_id,
+ ResourceId dest_id,
+ const gfx::Rect& rect);
+
void WaitSyncPointIfNeeded(ResourceId id);
+
+ void WaitReadLockIfNeeded(ResourceId id);
static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl);
@@ -444,7 +452,8 @@
BlockingTaskRunner* blocking_main_thread_task_runner,
int highp_threshold_min,
bool use_rgba_4444_texture_format,
- size_t id_allocation_chunk_size);
+ size_t id_allocation_chunk_size,
+ bool use_persistent_map_for_gpu_memory_buffers);
void Initialize();
private:
@@ -599,6 +608,9 @@
scoped_ptr<IdAllocator> buffer_id_allocator_;
bool use_sync_query_;
+ bool use_persistent_map_for_gpu_memory_buffers_;
+ // Fence used for CopyResource if CHROMIUM_sync_query is not supported.
+ scoped_refptr<SynchronousFence> synchronous_fence_;
DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
};
« no previous file with comments | « cc/resources/resource_pool_unittest.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698