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

Side by Side Diff: chrome/browser/android/vr_shell/textures/splash_screen_icon_texture.cc

Issue 2955483003: Show splash screen when entering VR from a deep-link (Closed)
Patch Set: fix compile error on bots Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/android/vr_shell/textures/splash_screen_icon_texture.h"
6
7 #include "ui/gfx/canvas.h"
8
9 namespace vr_shell {
10
11 SplashScreenIconTexture::SplashScreenIconTexture() = default;
12
13 SplashScreenIconTexture::~SplashScreenIconTexture() = default;
14
15 void SplashScreenIconTexture::SetSplashScreenIconBitmap(
16 const SkBitmap& bitmap) {
17 splash_screen_icon_ = SkImage::MakeFromBitmap(bitmap);
18 set_dirty();
19 }
20
21 void SplashScreenIconTexture::Draw(SkCanvas* sk_canvas,
22 const gfx::Size& texture_size) {
23 size_.set_width(texture_size.width());
24 size_.set_height(texture_size.height());
25
26 sk_canvas->drawImage(splash_screen_icon_, 0, 0);
27 }
28
29 gfx::Size SplashScreenIconTexture::GetPreferredTextureSize(
30 int maximum_width) const {
31 return gfx::Size(maximum_width, maximum_width);
32 }
33
34 gfx::SizeF SplashScreenIconTexture::GetDrawnSize() const {
35 return size_;
36 }
37
38 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698