Flutter Engine
The Flutter Engine
dl_complexity.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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 "flutter/display_list/benchmarking/dl_complexity.h"
6#include "flutter/display_list/benchmarking/dl_complexity_gl.h"
7#if !SLIMPELLER
8#include "flutter/display_list/benchmarking/dl_complexity_metal.h"
9#endif // !SLIMPELLER
10#include "flutter/display_list/display_list.h"
11
12namespace flutter {
13
14DisplayListNaiveComplexityCalculator*
15 DisplayListNaiveComplexityCalculator::instance_ = nullptr;
16
17DisplayListComplexityCalculator*
19 if (instance_ == nullptr) {
21 }
22 return instance_;
23}
24
27 switch (backend) {
29#if !SLIMPELLER
31#else
33#endif // !SLIMPELLER
36 default:
38 }
39}
40
44}
45
46} // namespace flutter
const char * backend
GrBackendApi
Definition: GrTypes.h:95
static DisplayListComplexityCalculator * GetForBackend(GrBackendApi backend)
static DisplayListComplexityCalculator * GetForSoftware()
static DisplayListGLComplexityCalculator * GetInstance()
static DisplayListMetalComplexityCalculator * GetInstance()
static DisplayListComplexityCalculator * GetInstance()