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

Side by Side Diff: cc/surfaces/surface_display_output_surface_unittest.cc

Issue 2238693002: Plumb SetVisible from ui::Compositor to the DirectRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setvisible-browser: onemore Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/surfaces/display_unittest.cc ('k') | cc/test/fake_external_begin_frame_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/surfaces/surface_display_output_surface.h" 5 #include "cc/surfaces/surface_display_output_surface.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "cc/output/renderer_settings.h" 9 #include "cc/output/renderer_settings.h"
10 #include "cc/output/texture_mailbox_deleter.h" 10 #include "cc/output/texture_mailbox_deleter.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 &bitmap_manager_, &gpu_memory_buffer_manager_, RendererSettings(), 54 &bitmap_manager_, &gpu_memory_buffer_manager_, RendererSettings(),
55 std::move(begin_frame_source), std::move(display_output_surface), 55 std::move(begin_frame_source), std::move(display_output_surface),
56 std::move(scheduler), 56 std::move(scheduler),
57 base::MakeUnique<TextureMailboxDeleter>(task_runner_.get()))); 57 base::MakeUnique<TextureMailboxDeleter>(task_runner_.get())));
58 delegated_output_surface_.reset(new SurfaceDisplayOutputSurface( 58 delegated_output_surface_.reset(new SurfaceDisplayOutputSurface(
59 &surface_manager_, &allocator_, display_.get(), context_provider_, 59 &surface_manager_, &allocator_, display_.get(), context_provider_,
60 nullptr)); 60 nullptr));
61 61
62 delegated_output_surface_->BindToClient(&delegated_output_surface_client_); 62 delegated_output_surface_->BindToClient(&delegated_output_surface_client_);
63 display_->Resize(display_size_); 63 display_->Resize(display_size_);
64 display_->SetVisible(true);
64 65
65 EXPECT_FALSE( 66 EXPECT_FALSE(
66 delegated_output_surface_client_.did_lose_output_surface_called()); 67 delegated_output_surface_client_.did_lose_output_surface_called());
67 } 68 }
68 69
69 ~SurfaceDisplayOutputSurfaceTest() override {} 70 ~SurfaceDisplayOutputSurfaceTest() override {}
70 71
71 void SwapBuffersWithDamage(const gfx::Rect& damage_rect) { 72 void SwapBuffersWithDamage(const gfx::Rect& damage_rect) {
72 std::unique_ptr<RenderPass> render_pass(RenderPass::Create()); 73 std::unique_ptr<RenderPass> render_pass(RenderPass::Create());
73 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect, 74 render_pass->SetNew(RenderPassId(1, 1), display_rect_, damage_rect,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 147 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
147 148
148 SwapBuffersWithDamage(gfx::Rect()); 149 SwapBuffersWithDamage(gfx::Rect());
149 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 150 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
150 task_runner_->RunUntilIdle(); 151 task_runner_->RunUntilIdle();
151 EXPECT_EQ(1u, display_output_surface_->num_sent_frames()); 152 EXPECT_EQ(1u, display_output_surface_->num_sent_frames());
152 } 153 }
153 154
154 } // namespace 155 } // namespace
155 } // namespace cc 156 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display_unittest.cc ('k') | cc/test/fake_external_begin_frame_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698