Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
CacheBudgetTest.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2024 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "tests/Test.h"
9
13
14static constexpr size_t kContextBudget = 1234567;
15
19
21 nullptr,
23 context,
24 testContext,
26 true,
28 REPORTER_ASSERT(reporter, context->maxBudgetedBytes() == kContextBudget);
29
30 static constexpr size_t kRecorderBudget = 7654321;
32 recorderOptions.fGpuBudgetInBytes = kRecorderBudget;
33
34 auto recorder = context->makeRecorder(recorderOptions);
35 if (!recorder) {
36 ERRORF(reporter, "Could not create recorder.");
37 return;
38 }
39
40 REPORTER_ASSERT(reporter, recorder->maxBudgetedBytes() == kRecorderBudget);
41}
static constexpr size_t kContextBudget
static void set_context_budget(skgpu::graphite::ContextOptions *options)
const char * options
reporter
#define REPORTER_ASSERT(r, cond,...)
Definition Test.h:286
#define ERRORF(r,...)
Definition Test.h:293
#define DEF_CONDITIONAL_GRAPHITE_TEST_FOR_CONTEXTS( name, context_filter, reporter, graphite_ctx, test_ctx, opt_filter, cond, ctsEnforcement)
Definition Test.h:337