• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "CanvasOpBuffer.h"
18 
19 #include "CanvasOps.h"
20 
21 namespace android::uirenderer {
22 
23 template class OpBuffer<CanvasOpType, CanvasOpContainer>;
24 
updateChildren(std::function<void (RenderNode *)> updateFn)25 void CanvasOpBuffer::updateChildren(std::function<void(RenderNode*)> updateFn) {
26     // TODO: Do we need a fast-path for finding children?
27     if (mHas.children) {
28         for (auto& iter : filter<CanvasOpType::DrawRenderNode>()) {
29             updateFn(iter->renderNode.get());
30         }
31     }
32 }
33 
output(std::ostream & output,uint32_t level) const34 void CanvasOpBuffer::output(std::ostream& output, uint32_t level) const {
35     LOG_ALWAYS_FATAL("TODO");
36 }
37 
prepareListAndChildren(TreeObserver & observer,TreeInfo & info,bool functorsNeedLayer,std::function<void (RenderNode *,TreeObserver &,TreeInfo &,bool)> childFn)38 bool CanvasOpBuffer::prepareListAndChildren(
39             TreeObserver& observer, TreeInfo& info, bool functorsNeedLayer,
40             std::function<void(RenderNode*, TreeObserver&, TreeInfo&, bool)> childFn) {
41     LOG_ALWAYS_FATAL("TODO");
42     return false;
43 }
44 
syncContents(const WebViewSyncData & data)45 void CanvasOpBuffer::syncContents(const WebViewSyncData& data) {
46     LOG_ALWAYS_FATAL("TODO");
47 }
48 
onRemovedFromTree()49 void CanvasOpBuffer::onRemovedFromTree() {
50     LOG_ALWAYS_FATAL("TODO");
51 }
52 
applyColorTransform(ColorTransform transform)53 void CanvasOpBuffer::applyColorTransform(ColorTransform transform) {
54     LOG_ALWAYS_FATAL("TODO");
55 }
56 
57 }  // namespace android::uirenderer
58