Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2484)

Unified Diff: cc/surfaces/surface_aggregator.cc

Issue 1968363002: SurfaceAggregator should check whether output is secure when drawin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface_aggregator.h ('k') | cc/surfaces/surface_aggregator_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 2beb8043e2b970c1eeb812622415e948c0732a97..75b8f6c9f1f5079cc2b20166eb7a69fb6367bce7 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -21,7 +21,9 @@
#include "cc/quads/draw_quad.h"
#include "cc/quads/render_pass_draw_quad.h"
#include "cc/quads/shared_quad_state.h"
+#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/surface_draw_quad.h"
+#include "cc/quads/texture_draw_quad.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_manager.h"
@@ -434,6 +436,20 @@ void SurfaceAggregator::CopyQuadsToPass(
dest_quad = dest_pass->CopyFromAndAppendRenderPassDrawQuad(
pass_quad, dest_shared_quad_state, remapped_pass_id);
+ } else if (quad->material == DrawQuad::TEXTURE_CONTENT) {
+ const TextureDrawQuad* texture_quad =
+ TextureDrawQuad::MaterialCast(quad);
+ if (texture_quad->secure_output_only &&
+ (!output_is_secure_ || copy_request_passes_.count(dest_pass->id))) {
+ SolidColorDrawQuad* solid_color_quad =
+ dest_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
+ solid_color_quad->SetNew(dest_shared_quad_state, quad->rect,
+ quad->visible_rect, SK_ColorBLACK, false);
+ dest_quad = solid_color_quad;
+ } else {
+ dest_quad = dest_pass->CopyFromAndAppendDrawQuad(
+ quad, dest_shared_quad_state);
+ }
} else {
dest_quad =
dest_pass->CopyFromAndAppendDrawQuad(quad, dest_shared_quad_state);
« no previous file with comments | « cc/surfaces/surface_aggregator.h ('k') | cc/surfaces/surface_aggregator_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698