summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-02-25 18:49:33 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-26 18:18:04 +0100
commit02cf9c842d408d26507b8f40d2e18a8b5c9bbc74 (patch)
treeb0c6a12da82163b285f2f01f398dcb94626d32ce /src
parente17211aac9328de202befbdd5c2b4e6852970701 (diff)
Handle CheckerboardDrawQuads in DelegatedFrameNode
Change-Id: I66541842650af4a2cc50cd0443eacde510df566f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/delegated_frame_node.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index 97a7066b..d704bf23 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -58,6 +58,7 @@
#include "base/message_loop/message_loop.h"
#include "base/bind.h"
#include "cc/output/delegated_frame_data.h"
+#include "cc/quads/checkerboard_draw_quad.h"
#include "cc/quads/draw_quad.h"
#include "cc/quads/render_pass_draw_quad.h"
#include "cc/quads/solid_color_draw_quad.h"
@@ -394,7 +395,17 @@ void DelegatedFrameNode::commit(DelegatedFrameNodeData* data, cc::ReturnedResour
}
switch (quad->material) {
- case cc::DrawQuad::RENDER_PASS: {
+ case cc::DrawQuad::CHECKERBOARD: {
+ const cc::CheckerboardDrawQuad *cbquad = cc::CheckerboardDrawQuad::MaterialCast(quad);
+ QSGRenderContext *sgrc = QQuickWindowPrivate::get(m_window)->context;
+ QSGRectangleNode *rectangleNode = sgrc->sceneGraphContext()->createRectangleNode();
+
+ rectangleNode->setRect(toQt(quad->rect));
+ rectangleNode->setColor(toQt(cbquad->color));
+ rectangleNode->update();
+ currentLayerChain->appendChildNode(rectangleNode);
+ break;
+ } case cc::DrawQuad::RENDER_PASS: {
const cc::RenderPassDrawQuad *renderPassQuad = cc::RenderPassDrawQuad::MaterialCast(quad);
QSGTexture *texture = findRenderPassTexture(renderPassQuad->render_pass_id, m_renderPassTextures).data();
// cc::GLRenderer::DrawRenderPassQuad silently ignores missing render passes.