2016-10-17 16:26:15 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-09-17 14:01:16 -04:00
|
|
|
#include "FunctorDrawable.h"
|
2018-05-03 14:40:56 -07:00
|
|
|
|
2017-11-03 10:12:19 -07:00
|
|
|
#include <utils/RefBase.h>
|
2016-10-17 16:26:15 -04:00
|
|
|
|
|
|
|
namespace android {
|
|
|
|
namespace uirenderer {
|
|
|
|
|
|
|
|
namespace skiapipeline {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This drawable wraps a OpenGL functor enabling it to be recorded into a list
|
|
|
|
* of Skia drawing commands.
|
|
|
|
*/
|
2018-09-17 14:01:16 -04:00
|
|
|
class GLFunctorDrawable : public FunctorDrawable {
|
2016-10-17 16:26:15 -04:00
|
|
|
public:
|
2018-12-13 16:40:14 -08:00
|
|
|
using FunctorDrawable::FunctorDrawable;
|
2016-10-17 16:26:15 -04:00
|
|
|
|
2020-06-25 17:14:13 -07:00
|
|
|
virtual ~GLFunctorDrawable() {}
|
2016-10-17 16:26:15 -04:00
|
|
|
|
2017-11-03 10:12:19 -07:00
|
|
|
protected:
|
2018-11-19 10:53:04 -08:00
|
|
|
void onDraw(SkCanvas* canvas) override;
|
2016-10-17 16:26:15 -04:00
|
|
|
};
|
|
|
|
|
2018-11-30 15:51:58 -08:00
|
|
|
} // namespace skiapipeline
|
|
|
|
} // namespace uirenderer
|
|
|
|
} // namespace android
|