| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkHwuiRenderer_DEFINED | 8 #ifndef SkHwuiRenderer_DEFINED |
| 9 #define SkHwuiRenderer_DEFINED | 9 #define SkHwuiRenderer_DEFINED |
| 10 | 10 |
| 11 #include "DisplayListRenderer.h" | 11 #include "DisplayListCanvas.h" |
| 12 #include "RenderNode.h" | 12 #include "RenderNode.h" |
| 13 #include "SkTypes.h" | 13 #include "SkTypes.h" |
| 14 #include "gui/CpuConsumer.h" | 14 #include "gui/CpuConsumer.h" |
| 15 #include "gui/IGraphicBufferConsumer.h" | 15 #include "gui/IGraphicBufferConsumer.h" |
| 16 #include "gui/IGraphicBufferProducer.h" | 16 #include "gui/IGraphicBufferProducer.h" |
| 17 #include "gui/Surface.h" | 17 #include "gui/Surface.h" |
| 18 #include "renderthread/RenderProxy.h" | 18 #include "renderthread/RenderProxy.h" |
| 19 | 19 |
| 20 class SkBitmap; | 20 class SkBitmap; |
| 21 | 21 |
| 22 struct SkHwuiRenderer { | 22 struct SkHwuiRenderer { |
| 23 SkAutoTDelete<android::uirenderer::RenderNode> rootNode; | 23 SkAutoTDelete<android::uirenderer::RenderNode> rootNode; |
| 24 SkAutoTDelete<android::uirenderer::renderthread::RenderProxy> proxy; | 24 SkAutoTDelete<android::uirenderer::renderthread::RenderProxy> proxy; |
| 25 SkAutoTDelete<android::uirenderer::DisplayListRenderer> renderer; | 25 SkAutoTDelete<android::uirenderer::DisplayListCanvas> canvas; |
| 26 android::sp<android::IGraphicBufferProducer> producer; | 26 android::sp<android::IGraphicBufferProducer> producer; |
| 27 android::sp<android::IGraphicBufferConsumer> consumer; | 27 android::sp<android::IGraphicBufferConsumer> consumer; |
| 28 android::sp<android::CpuConsumer> cpuConsumer; | 28 android::sp<android::CpuConsumer> cpuConsumer; |
| 29 android::sp<android::Surface> androidSurface; | 29 android::sp<android::Surface> androidSurface; |
| 30 SkISize size; | 30 SkISize size; |
| 31 | 31 |
| 32 void initialize(SkISize size); | 32 void initialize(SkISize size); |
| 33 | 33 |
| 34 /// Returns a canvas to draw into. | 34 /// Returns a canvas to draw into. |
| 35 SkCanvas* prepareToDraw(); | 35 SkCanvas* prepareToDraw(); |
| 36 | 36 |
| 37 void finishDrawing(); | 37 void finishDrawing(); |
| 38 | 38 |
| 39 bool capturePixels(SkBitmap* bmp); | 39 bool capturePixels(SkBitmap* bmp); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 #endif // SkHwuiRenderer_DEFINED | 42 #endif // SkHwuiRenderer_DEFINED |
| OLD | NEW |