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

Unified Diff: content/browser/web_contents/aura/shadow_layer_delegate.cc

Issue 1066183002: content/aura: Use a PaintRecorder to access the Canvas for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content-recorder: . Created 5 years, 8 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 | « content/browser/web_contents/aura/overscroll_navigation_overlay.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/aura/shadow_layer_delegate.cc
diff --git a/content/browser/web_contents/aura/shadow_layer_delegate.cc b/content/browser/web_contents/aura/shadow_layer_delegate.cc
index e4ae537938b6afcfddc3aad7d6e56f6bece7f72e..54543075adc8648a332f1afbe3f938fae442e758 100644
--- a/content/browser/web_contents/aura/shadow_layer_delegate.cc
+++ b/content/browser/web_contents/aura/shadow_layer_delegate.cc
@@ -8,7 +8,7 @@
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
-#include "ui/compositor/paint_context.h"
+#include "ui/compositor/paint_recorder.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/skia_util.h"
@@ -49,7 +49,9 @@ void ShadowLayerDelegate::OnPaintLayer(const ui::PaintContext& context) {
layer_->bounds().height());
SkPaint paint;
paint.setShader(shader.get());
- context.canvas()->sk_canvas()->drawRect(gfx::RectToSkRect(paint_rect), paint);
+ ui::PaintRecorder recorder(context);
+ recorder.canvas()->sk_canvas()->drawRect(gfx::RectToSkRect(paint_rect),
+ paint);
}
void ShadowLayerDelegate::OnDelegatedFrameDamage(
« no previous file with comments | « content/browser/web_contents/aura/overscroll_navigation_overlay.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698