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

Unified Diff: cc/test/test_compositor_frame_sink.h

Issue 2402173002: cc: Get rid of PostSwapBuffersComplete. (Closed)
Patch Set: postswap: fix-blimp-unittest-post-swap-acks Created 4 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 | « cc/test/pixel_test_output_surface.cc ('k') | cc/test/test_compositor_frame_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_compositor_frame_sink.h
diff --git a/cc/test/test_compositor_frame_sink.h b/cc/test/test_compositor_frame_sink.h
index 2cd6f502dc4fe2166be8885cadffb24b902a1bb9..5c1c1bae65f8dc2e791130ddf47580513532a482 100644
--- a/cc/test/test_compositor_frame_sink.h
+++ b/cc/test/test_compositor_frame_sink.h
@@ -5,6 +5,7 @@
#ifndef CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_
#define CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_
+#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "cc/output/compositor_frame_sink.h"
#include "cc/output/renderer_settings.h"
@@ -16,6 +17,10 @@
#include "cc/surfaces/surface_id_allocator.h"
#include "cc/surfaces/surface_manager.h"
+namespace base {
+class SingleThreadTaskRunner;
+}
+
namespace cc {
class CopyOutputRequest;
class OutputSurface;
@@ -44,7 +49,7 @@ class TestCompositorFrameSink : public CompositorFrameSink,
SharedBitmapManager* shared_bitmap_manager,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
const RendererSettings& renderer_settings,
- base::SingleThreadTaskRunner* task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
bool synchronous_composite,
bool force_disable_reclaim_resources);
~TestCompositorFrameSink() override;
@@ -80,6 +85,8 @@ class TestCompositorFrameSink : public CompositorFrameSink,
private:
void DidDrawCallback();
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+
FrameSinkId frame_sink_id_;
// TODO(danakj): These don't need to be stored in unique_ptrs when
// CompositorFrameSink is owned/destroyed on the compositor thread.
@@ -100,6 +107,8 @@ class TestCompositorFrameSink : public CompositorFrameSink,
gfx::Size enlarge_pass_texture_amount_;
std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_;
+
+ base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_;
};
} // namespace cc
« no previous file with comments | « cc/test/pixel_test_output_surface.cc ('k') | cc/test/test_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698