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

Unified Diff: ash/common/wm/overview/scoped_transform_overview_window.cc

Issue 2125133002: [BUG REPRO ONLY] Demonstrates texture reuse for mask layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/overview/scoped_transform_overview_window.cc
diff --git a/ash/common/wm/overview/scoped_transform_overview_window.cc b/ash/common/wm/overview/scoped_transform_overview_window.cc
index ca1974343fc8cc04797ae5dae6cc593286b98d7c..7dee4306c9e3e9c489ac6c6f2851c28662ed7c01 100644
--- a/ash/common/wm/overview/scoped_transform_overview_window.cc
+++ b/ash/common/wm/overview/scoped_transform_overview_window.cc
@@ -16,6 +16,7 @@
#include "ash/common/wm_window_property.h"
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
@@ -213,29 +214,18 @@ ScopedTransformOverviewWindow::OverviewContentMask::~OverviewContentMask() {
void ScopedTransformOverviewWindow::OverviewContentMask::OnPaintLayer(
const ui::PaintContext& context) {
ui::PaintRecorder recorder(context, layer()->size());
- gfx::Rect bounds(layer()->bounds().size());
- bounds.Inset(0, inset_, 0, 0);
-
- // Tile a window into an area, rounding the bottom corners.
- const SkRect rect = gfx::RectToSkRect(bounds);
- const SkScalar corner_radius_scalar = SkIntToScalar(radius_);
- SkScalar radii[8] = {0,
- 0, // top-left
- 0,
- 0, // top-right
- corner_radius_scalar,
- corner_radius_scalar, // bottom-right
- corner_radius_scalar,
- corner_radius_scalar}; // bottom-left
- SkPath path;
- path.addRoundRect(rect, radii, SkPath::kCW_Direction);
-
- // Set a mask.
- SkPaint paint;
- paint.setAlpha(kOverviewContentMaskAlpha);
- paint.setStyle(SkPaint::kFill_Style);
- paint.setAntiAlias(true);
- recorder.canvas()->DrawPath(path, paint);
+
+ (void)inset_;
+ (void)radius_;
+ (void)kOverviewContentMaskAlpha;
+
+ LOG(ERROR) << __FUNCTION__ << " id=" << layer_.cc_layer_for_testing()->id();
+ gfx::Rect bounds(50, 10 * (layer_.cc_layer_for_testing()->id() % 10), 100,
+ 100);
+ std::string txt = std::to_string(layer_.cc_layer_for_testing()->id());
+ base::string16 text(base::UTF8ToUTF16(txt));
+ recorder.canvas()->DrawStringRect(text, gfx::FontList(), SK_ColorWHITE,
+ bounds);
}
void ScopedTransformOverviewWindow::OverviewContentMask::
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698