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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 23961003: cc: Remove most methods from RendererClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rendererclient: rebase Created 7 years, 3 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/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 544bb232e2b5750fac8c0dcda83b79f3629808e3..08774f1263bb9efc0d8f8f4a402046fad5a2a8a9 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -4999,12 +4999,12 @@ struct RenderPassRemovalTestData : public LayerTreeHostImpl::FrameData {
class TestRenderer : public GLRenderer, public RendererClient {
public:
- static scoped_ptr<TestRenderer> Create(ResourceProvider* resource_provider,
+ static scoped_ptr<TestRenderer> Create(const LayerTreeSettings* settings,
+ ResourceProvider* resource_provider,
OutputSurface* output_surface,
Proxy* proxy) {
- scoped_ptr<TestRenderer> renderer(new TestRenderer(resource_provider,
- output_surface,
- proxy));
+ scoped_ptr<TestRenderer> renderer(
+ new TestRenderer(settings, resource_provider, output_surface, proxy));
if (!renderer->Initialize())
return scoped_ptr<TestRenderer>();
@@ -5025,30 +5025,18 @@ class TestRenderer : public GLRenderer, public RendererClient {
virtual gfx::Rect DeviceViewport() const OVERRIDE {
return gfx::Rect(viewport_size_);
}
- virtual gfx::Rect DeviceClip() const OVERRIDE {
- return DeviceViewport();
- }
- virtual float DeviceScaleFactor() const OVERRIDE {
- return 1.f;
- }
- virtual const LayerTreeSettings& Settings() const OVERRIDE {
- return settings_;
- }
+ virtual gfx::Rect DeviceClip() const OVERRIDE { return DeviceViewport(); }
virtual void SetFullRootLayerDamage() OVERRIDE {}
- virtual bool HasImplThread() const OVERRIDE { return false; }
- virtual bool ShouldClearRootRenderPass() const OVERRIDE { return true; }
- virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const
- OVERRIDE { return CompositorFrameMetadata(); }
- virtual bool AllowPartialSwap() const OVERRIDE {
- return true;
+ virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE {
+ return CompositorFrameMetadata();
}
- virtual bool ExternalStencilTestEnabled() const OVERRIDE { return false; }
protected:
- TestRenderer(ResourceProvider* resource_provider,
+ TestRenderer(const LayerTreeSettings* settings,
+ ResourceProvider* resource_provider,
OutputSurface* output_surface,
Proxy* proxy)
- : GLRenderer(this, output_surface, resource_provider, 0) {}
+ : GLRenderer(this, settings, output_surface, resource_provider, 0) {}
private:
LayerTreeSettings settings_;
@@ -5368,6 +5356,7 @@ static void VerifyRenderPassTestData(
}
TEST_F(LayerTreeHostImplTest, TestRemoveRenderPasses) {
+ LayerTreeSettings settings;
FakeOutputSurfaceClient output_surface_client;
scoped_ptr<OutputSurface> output_surface(CreateOutputSurface());
ASSERT_TRUE(output_surface->BindToClient(&output_surface_client));
@@ -5376,10 +5365,8 @@ TEST_F(LayerTreeHostImplTest, TestRemoveRenderPasses) {
scoped_ptr<ResourceProvider> resource_provider =
ResourceProvider::Create(output_surface.get(), 0);
- scoped_ptr<TestRenderer> renderer =
- TestRenderer::Create(resource_provider.get(),
- output_surface.get(),
- &proxy_);
+ scoped_ptr<TestRenderer> renderer = TestRenderer::Create(
+ &settings, resource_provider.get(), output_surface.get(), &proxy_);
int test_case_index = 0;
while (remove_render_passes_cases[test_case_index].name) {
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698