summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_output_surface_client.cc
blob: 7b371cab1eba29e6b33f3357bc27269c84a9f0f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/test/fake_output_surface_client.h"

namespace cc {

bool FakeOutputSurfaceClient::DeferredInitialize(
    scoped_refptr<ContextProvider> offscreen_context_provider) {
  deferred_initialize_called_ = true;
  return deferred_initialize_result_;
}

void FakeOutputSurfaceClient::BeginFrame(const BeginFrameArgs& args) {
  begin_frame_count_++;
}

void FakeOutputSurfaceClient::DidLoseOutputSurface() {
  did_lose_output_surface_called_ = true;
}

void FakeOutputSurfaceClient::SetMemoryPolicy(
    const ManagedMemoryPolicy& policy,
    bool discard_backbuffer_when_not_visible) {
  memory_policy_ = policy;
  discard_backbuffer_when_not_visible_ = discard_backbuffer_when_not_visible;
}

}  // namespace cc