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

Unified Diff: ash/wm/boot_splash_screen_chromeos.cc

Issue 1057873004: Pass a ui::PaintContext from ui::Layer to layer delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer-paintcontext: mac Created 5 years, 9 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 | « ash/utility/partial_screenshot_controller.cc ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/boot_splash_screen_chromeos.cc
diff --git a/ash/wm/boot_splash_screen_chromeos.cc b/ash/wm/boot_splash_screen_chromeos.cc
index f67243d8bca07455aaf6848fd7587ffb104739b2..04d66c3014118477270649762f8d40677bb0f902 100644
--- a/ash/wm/boot_splash_screen_chromeos.cc
+++ b/ash/wm/boot_splash_screen_chromeos.cc
@@ -10,6 +10,7 @@
#include "ui/base/x/x11_util.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_type.h"
+#include "ui/compositor/paint_context.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/canvas.h"
@@ -26,7 +27,7 @@ class BootSplashScreen::CopyHostContentLayerDelegate
~CopyHostContentLayerDelegate() override {}
// ui::LayerDelegate overrides:
- void OnPaintLayer(gfx::Canvas* canvas) override {
+ void OnPaintLayer(const ui::PaintContext& context) override {
// It'd be safer to copy the area to a canvas in the constructor and then
// copy from that canvas to this one here, but this appears to work (i.e. we
// only call this before we draw our first frame) and it saves us an extra
@@ -35,8 +36,8 @@ class BootSplashScreen::CopyHostContentLayerDelegate
// to create a zero-copy texture (when possible):
// https://codereview.chromium.org/10543125
#if defined(USE_X11)
- ui::CopyAreaToCanvas(host_->GetAcceleratedWidget(),
- host_->GetBounds(), gfx::Point(), canvas);
+ ui::CopyAreaToCanvas(host_->GetAcceleratedWidget(), host_->GetBounds(),
+ gfx::Point(), context.canvas());
#else
// TODO(spang): Figure out what to do here.
NOTIMPLEMENTED();
« no previous file with comments | « ash/utility/partial_screenshot_controller.cc ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698