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
31
32
33
cc / paint / shader_transfer_cache_entry.cc [blame]
// Copyright 2018 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/paint/shader_transfer_cache_entry.h"
#include <utility>
#include "base/notreached.h"
namespace cc {
ServiceShaderTransferCacheEntry::ServiceShaderTransferCacheEntry(
sk_sp<PaintShader> shader,
size_t size)
: shader_(std::move(shader)),
size_(size) {}
ServiceShaderTransferCacheEntry::~ServiceShaderTransferCacheEntry() = default;
size_t ServiceShaderTransferCacheEntry::CachedSize() const {
return size_;
}
bool ServiceShaderTransferCacheEntry::Deserialize(
GrDirectContext* context,
skgpu::graphite::Recorder* graphite_recorder,
base::span<const uint8_t> data) {
// These entries must be created directly via CreateLocalEntry.
NOTREACHED();
}
} // namespace cc