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

Side by Side Diff: content/test/layouttest_support.cc

Issue 2633563003: Revert of Remove ForceReclaimResources (Closed)
Patch Set: Created 3 years, 11 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 | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/compositor/layer_unittest.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 task_runner = base::ThreadTaskRunnerHandle::Get().get(); 348 task_runner = base::ThreadTaskRunnerHandle::Get().get();
349 349
350 cc::LayerTreeSettings settings = 350 cc::LayerTreeSettings settings =
351 RenderWidgetCompositor::GenerateLayerTreeSettings( 351 RenderWidgetCompositor::GenerateLayerTreeSettings(
352 *base::CommandLine::ForCurrentProcess(), deps, 1.f); 352 *base::CommandLine::ForCurrentProcess(), deps, 1.f);
353 353
354 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>( 354 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>(
355 std::move(compositor_context_provider), 355 std::move(compositor_context_provider),
356 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */, 356 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */,
357 gpu_memory_buffer_manager, settings.renderer_settings, task_runner, 357 gpu_memory_buffer_manager, settings.renderer_settings, task_runner,
358 synchronous_composite); 358 synchronous_composite, false /* force_disable_reclaim_resources */);
359 compositor_frame_sink->SetClient(this); 359 compositor_frame_sink->SetClient(this);
360 compositor_frame_sinks_[routing_id] = compositor_frame_sink.get(); 360 compositor_frame_sinks_[routing_id] = compositor_frame_sink.get();
361 return std::move(compositor_frame_sink); 361 return std::move(compositor_frame_sink);
362 } 362 }
363 363
364 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( 364 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput(
365 int32_t routing_id, 365 int32_t routing_id,
366 std::unique_ptr<cc::CopyOutputRequest> request) override { 366 std::unique_ptr<cc::CopyOutputRequest> request) override {
367 // Note that we can't immediately check compositor_frame_sinks_, since it 367 // Note that we can't immediately check compositor_frame_sinks_, since it
368 // may not have been created yet. Instead, we wait until OnCommit to find 368 // may not have been created yet. Instead, we wait until OnCommit to find
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { 600 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) {
601 if (auto* render_widget = 601 if (auto* render_widget =
602 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { 602 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) {
603 render_widget->UpdateTextInputState(ShowIme::IF_NEEDED, 603 render_widget->UpdateTextInputState(ShowIme::IF_NEEDED,
604 ChangeSource::FROM_NON_IME); 604 ChangeSource::FROM_NON_IME);
605 } 605 }
606 } 606 }
607 607
608 } // namespace content 608 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698