blob: 0cfe08bef45f6166dbb3e26ba5e325b3f9f5ddc3 [file] [log] [blame]
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cc/test/fake_layer_tree_host_client.h"
#include "cc/test/fake_layer_tree_frame_sink.h"
#include "cc/trees/layer_tree_host.h"
namespace cc {
FakeLayerTreeHostClient::FakeLayerTreeHostClient() = default;
FakeLayerTreeHostClient::~FakeLayerTreeHostClient() = default;
void FakeLayerTreeHostClient::RequestNewLayerTreeFrameSink() {
DCHECK(host_);
host_->SetLayerTreeFrameSink(software_comp_
? FakeLayerTreeFrameSink::CreateSoftware()
: FakeLayerTreeFrameSink::Create3d());
}
void FakeLayerTreeHostClient::DidFailToInitializeLayerTreeFrameSink() {
RequestNewLayerTreeFrameSink();
}
} // namespace cc