Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flow/raster_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class RasterCache {
* to be stored in the cache.
*
* @param picture the SkPicture object to be cached.
* @param context the GrContext used for rendering.
* @param context the GrDirectContext used for rendering.
* @param ctm the transformation matrix used for rendering.
* @param dst_color_space the destination color space that the cached
* rendering will be drawn into
Expand Down
2 changes: 1 addition & 1 deletion flow/skia_gpu_object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace flutter {

SkiaUnrefQueue::SkiaUnrefQueue(fml::RefPtr<fml::TaskRunner> task_runner,
fml::TimeDelta delay,
fml::WeakPtr<GrContext> context)
fml::WeakPtr<GrDirectContext> context)
: task_runner_(std::move(task_runner)),
drain_delay_(delay),
drain_pending_(false),
Expand Down
4 changes: 2 additions & 2 deletions flow/skia_gpu_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ class SkiaUnrefQueue : public fml::RefCountedThreadSafe<SkiaUnrefQueue> {
std::mutex mutex_;
std::deque<SkRefCnt*> objects_;
bool drain_pending_;
fml::WeakPtr<GrContext> context_;
fml::WeakPtr<GrDirectContext> context_;

// The `GrDirectContext* context` is only used for signaling Skia to
// performDeferredCleanup. It can be nullptr when such signaling is not needed
// (e.g., in unit tests).
SkiaUnrefQueue(fml::RefPtr<fml::TaskRunner> task_runner,
fml::TimeDelta delay,
fml::WeakPtr<GrContext> context = {});
fml::WeakPtr<GrDirectContext> context = {});

~SkiaUnrefQueue();

Expand Down
4 changes: 2 additions & 2 deletions lib/ui/painting/multi_frame_codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static bool CopyToBitmap(SkBitmap* dst,
}

sk_sp<SkImage> MultiFrameCodec::State::GetNextFrameImage(
fml::WeakPtr<GrContext> resourceContext) {
fml::WeakPtr<GrDirectContext> resourceContext) {
SkBitmap bitmap = SkBitmap();
SkImageInfo info = generator_->getInfo().makeColorType(kN32_SkColorType);
if (info.alphaType() == kUnpremul_SkAlphaType) {
Expand Down Expand Up @@ -136,7 +136,7 @@ sk_sp<SkImage> MultiFrameCodec::State::GetNextFrameImage(
void MultiFrameCodec::State::GetNextFrameAndInvokeCallback(
std::unique_ptr<DartPersistentValue> callback,
fml::RefPtr<fml::TaskRunner> ui_task_runner,
fml::WeakPtr<GrContext> resourceContext,
fml::WeakPtr<GrDirectContext> resourceContext,
fml::RefPtr<flutter::SkiaUnrefQueue> unref_queue,
size_t trace_id) {
fml::RefPtr<FrameInfo> frameInfo = NULL;
Expand Down
5 changes: 3 additions & 2 deletions lib/ui/painting/multi_frame_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ class MultiFrameCodec : public Codec {
// The index of the last decoded required frame.
int lastRequiredFrameIndex_ = -1;

sk_sp<SkImage> GetNextFrameImage(fml::WeakPtr<GrContext> resourceContext);
sk_sp<SkImage> GetNextFrameImage(
fml::WeakPtr<GrDirectContext> resourceContext);

void GetNextFrameAndInvokeCallback(
std::unique_ptr<DartPersistentValue> callback,
fml::RefPtr<fml::TaskRunner> ui_task_runner,
fml::WeakPtr<GrContext> resourceContext,
fml::WeakPtr<GrDirectContext> resourceContext,
fml::RefPtr<flutter::SkiaUnrefQueue> unref_queue,
size_t trace_id);
};
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/ui_dart_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fml::WeakPtr<SnapshotDelegate> UIDartState::GetSnapshotDelegate() const {
return snapshot_delegate_;
}

fml::WeakPtr<GrContext> UIDartState::GetResourceContext() const {
fml::WeakPtr<GrDirectContext> UIDartState::GetResourceContext() const {
if (!io_manager_) {
return {};
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/ui_dart_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class UIDartState : public tonic::DartState {

fml::WeakPtr<SnapshotDelegate> GetSnapshotDelegate() const;

fml::WeakPtr<GrContext> GetResourceContext() const;
fml::WeakPtr<GrDirectContext> GetResourceContext() const;

fml::WeakPtr<ImageDecoder> GetImageDecoder() const;

Expand Down