Home | History | Annotate | Download | only in test
      1 // Copyright 2012 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "cc/test/fake_layer_tree_host_impl.h"
      6 #include "cc/trees/layer_tree_impl.h"
      7 
      8 namespace cc {
      9 
     10 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(Proxy* proxy)
     11     : LayerTreeHostImpl(LayerTreeSettings(),
     12                         &client_,
     13                         proxy,
     14                         &stats_instrumentation_) {
     15   // Explicitly clear all debug settings.
     16   SetDebugState(LayerTreeDebugState());
     17 }
     18 
     19 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(
     20     const LayerTreeSettings& settings,
     21     Proxy* proxy)
     22     : LayerTreeHostImpl(settings,
     23                         &client_,
     24                         proxy,
     25                         &stats_instrumentation_) {
     26   // Explicitly clear all debug settings.
     27   SetDebugState(LayerTreeDebugState());
     28 }
     29 
     30 FakeLayerTreeHostImpl::~FakeLayerTreeHostImpl() {}
     31 
     32 void FakeLayerTreeHostImpl::CreatePendingTree() {
     33   LayerTreeHostImpl::CreatePendingTree();
     34   float arbitrary_large_page_scale = 100000.f;
     35   pending_tree()->SetPageScaleFactorAndLimits(
     36       1.f, 1.f / arbitrary_large_page_scale, arbitrary_large_page_scale);
     37 }
     38 
     39 }  // namespace cc
     40