Flutter Engine
 
Loading...
Searching...
No Matches
dl_test_surface_software.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
6
7#include "third_party/skia/include/core/SkSurface.h"
8
9namespace flutter {
10namespace testing {
11
13
15 size_t height,
16 PixelFormat format) {
18 return primary_ != nullptr;
19}
20
21std::shared_ptr<DlSurfaceInstance>
23 size_t height,
24 PixelFormat format) const {
25 auto surface = SkSurfaces::Raster(MakeInfo(format, width, height));
26 surface->getCanvas()->clear(SK_ColorTRANSPARENT);
27 return std::make_shared<DlSurfaceInstanceBase>(surface);
28}
29
30} // namespace testing
31} // namespace flutter
bool InitializeSurface(size_t width, size_t height, PixelFormat format) override
std::shared_ptr< DlSurfaceInstance > MakeOffscreenSurface(size_t width, size_t height, PixelFormat format) const override
static SkImageInfo MakeInfo(PixelFormat format, int w, int h)
VkSurfaceKHR surface
Definition main.cc:65
uint32_t uint32_t * format
DlSurfaceProvider::PixelFormat PixelFormat
int32_t height
int32_t width