1cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett/*
2cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett * Copyright (C) 2016 The Android Open Source Project
3cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett *
4cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett * Licensed under the Apache License, Version 2.0 (the "License");
5cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett * you may not use this file except in compliance with the License.
6cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett * You may obtain a copy of the License at
7cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett *
8cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett *      http://www.apache.org/licenses/LICENSE-2.0
9cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett *
10cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett * Unless required by applicable law or agreed to in writing, software
11cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett * distributed under the License is distributed on an "AS IS" BASIS,
12cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett * See the License for the specific language governing permissions and
14cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett * limitations under the License.
15cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett */
16cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett
17cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett#include "IProfileRenderer.h"
18cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett
19cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett#include "BakedOpRenderer.h"
20cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett
21cf2c05c652190ddc66f873192c17d193478138a1Matt Sarettnamespace android {
22cf2c05c652190ddc66f873192c17d193478138a1Matt Sarettnamespace uirenderer {
23cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett
24cf2c05c652190ddc66f873192c17d193478138a1Matt Sarettclass SkiaProfileRenderer : public IProfileRenderer {
25cf2c05c652190ddc66f873192c17d193478138a1Matt Sarettpublic:
261bcacfdcab0eaa0cee92bd7f5a1b5e271dd68e52John Reck    SkiaProfileRenderer(SkCanvas* canvas) : mCanvas(canvas) {}
27cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett
28cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett    void drawRect(float left, float top, float right, float bottom, const SkPaint& paint) override;
29cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett    void drawRects(const float* rects, int count, const SkPaint& paint) override;
30cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett    uint32_t getViewportWidth() override;
31cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett    uint32_t getViewportHeight() override;
32cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett
33cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett    virtual ~SkiaProfileRenderer() {}
34cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett
35cf2c05c652190ddc66f873192c17d193478138a1Matt Sarettprivate:
36cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett    // Does not have ownership.
37cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett    SkCanvas* mCanvas;
38cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett};
39cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett
40cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett} /* namespace uirenderer */
41cf2c05c652190ddc66f873192c17d193478138a1Matt Sarett} /* namespace android */
42