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

Unified Diff: cc/output/gl_renderer.cc

Issue 689463003: cc: Move FallbackFence implementation from GLRenderer to ResourceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@one-copy-throttling
Patch Set: rebase Created 6 years, 2 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 | « no previous file | cc/resources/one_copy_raster_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 4191f47d2adc794a8dcc57854e136364917679dc..b4ff0b32f826fc0bde5790b844cf27047a45ff78 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -50,36 +50,6 @@ using gpu::gles2::GLES2Interface;
namespace cc {
namespace {
-class FallbackFence : public ResourceProvider::Fence {
- public:
- explicit FallbackFence(gpu::gles2::GLES2Interface* gl)
- : gl_(gl), has_passed_(true) {}
-
- // Overridden from ResourceProvider::Fence:
- void Set() override { has_passed_ = false; }
- bool HasPassed() override {
- if (!has_passed_) {
- has_passed_ = true;
- Synchronize();
- }
- return true;
- }
- void Wait() override { HasPassed(); }
-
- private:
- ~FallbackFence() override {}
-
- void Synchronize() {
- TRACE_EVENT0("cc", "FallbackFence::Synchronize");
- gl_->Finish();
- }
-
- gpu::gles2::GLES2Interface* gl_;
- bool has_passed_;
-
- DISALLOW_COPY_AND_ASSIGN(FallbackFence);
-};
-
bool NeedsIOSurfaceReadbackWorkaround() {
#if defined(OS_MACOSX)
// This isn't strictly required in DumpRenderTree-mode when Mesa is used,
@@ -497,7 +467,8 @@ void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) {
read_lock_fence = current_sync_query_->Begin();
} else {
- read_lock_fence = make_scoped_refptr(new FallbackFence(gl_));
+ read_lock_fence =
+ make_scoped_refptr(new ResourceProvider::SynchronousFence(gl_));
}
resource_provider_->SetReadLockFence(read_lock_fence.get());
« no previous file with comments | « no previous file | cc/resources/one_copy_raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698