summaryrefslogtreecommitdiff
path: root/Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp')
-rw-r--r--Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp b/Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp
index 4af774d32..efc506160 100644
--- a/Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp
+++ b/Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp
@@ -3,6 +3,7 @@
* Copyright (C) 2010 Igalia S.L.
* Copyright (C) 2011 ProFUSION Embedded Systems
* Copyright (C) 2011 Samsung Electronics
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -56,6 +57,32 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool, bool, bool, bool
if (!ewk_view_paint(privateData, context.get(), &rect))
return 0;
+ if (DumpRenderTreeSupportEfl::isTrackingRepaints(mainFrame)) {
+ cairo_push_group(context.get());
+
+ // Paint the gray mask over the original image.
+ cairo_set_source_rgba(context.get(), 0, 0, 0, 0.66);
+ cairo_paint(context.get());
+
+ // Paint transparent rectangles over the mask to show the repainted regions.
+ cairo_set_source_rgba(context.get(), 0, 0, 0, 0);
+ cairo_set_operator(context.get(), CAIRO_OPERATOR_SOURCE);
+
+ Eina_List* repaintRects = DumpRenderTreeSupportEfl::trackedRepaintRects(mainFrame);
+ void* iter = 0;
+ EINA_LIST_FREE(repaintRects, iter) {
+ Eina_Rectangle* rect = static_cast<Eina_Rectangle*>(iter);
+
+ cairo_rectangle(context.get(), rect->x, rect->y, rect->w, rect->h);
+ cairo_fill(context.get());
+
+ eina_rectangle_free(rect);
+ }
+
+ cairo_pop_group_to_source(context.get());
+ cairo_paint(context.get());
+ }
+
if (drawSelectionRect) {
const WebCore::IntRect selectionRect = DumpRenderTreeSupportEfl::selectionRectangle(mainFrame);