OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/boot_splash_screen_chromeos.h" | 5 #include "ash/wm/boot_splash_screen_chromeos.h" |
6 | 6 |
7 #include "third_party/skia/include/core/SkBitmap.h" | 7 #include "third_party/skia/include/core/SkBitmap.h" |
8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
9 #include "ui/aura/window_tree_host.h" | 9 #include "ui/aura/window_tree_host.h" |
10 #include "ui/base/x/x11_util.h" | 10 #include "ui/base/x/x11_util.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // ui::LayerDelegate overrides: | 28 // ui::LayerDelegate overrides: |
29 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE { | 29 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE { |
30 // It'd be safer to copy the area to a canvas in the constructor and then | 30 // It'd be safer to copy the area to a canvas in the constructor and then |
31 // copy from that canvas to this one here, but this appears to work (i.e. we | 31 // copy from that canvas to this one here, but this appears to work (i.e. we |
32 // only call this before we draw our first frame) and it saves us an extra | 32 // only call this before we draw our first frame) and it saves us an extra |
33 // copy. | 33 // copy. |
34 // TODO(derat): Instead of copying the data, use GLX_EXT_texture_from_pixmap | 34 // TODO(derat): Instead of copying the data, use GLX_EXT_texture_from_pixmap |
35 // to create a zero-copy texture (when possible): | 35 // to create a zero-copy texture (when possible): |
36 // https://codereview.chromium.org/10543125 | 36 // https://codereview.chromium.org/10543125 |
| 37 #if defined(USE_X11) |
37 ui::CopyAreaToCanvas(host_->GetAcceleratedWidget(), | 38 ui::CopyAreaToCanvas(host_->GetAcceleratedWidget(), |
38 host_->GetBounds(), gfx::Point(), canvas); | 39 host_->GetBounds(), gfx::Point(), canvas); |
| 40 #else |
| 41 // TODO(spang): Figure out what to do here. |
| 42 NOTIMPLEMENTED(); |
| 43 #endif |
39 } | 44 } |
40 | 45 |
41 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {} | 46 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {} |
42 | 47 |
43 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { | 48 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { |
44 return base::Closure(); | 49 return base::Closure(); |
45 } | 50 } |
46 | 51 |
47 private: | 52 private: |
48 aura::WindowTreeHost* host_; // not owned | 53 aura::WindowTreeHost* host_; // not owned |
(...skipping 16 matching lines...) Expand all Loading... |
65 } | 70 } |
66 | 71 |
67 void BootSplashScreen::StartHideAnimation(base::TimeDelta duration) { | 72 void BootSplashScreen::StartHideAnimation(base::TimeDelta duration) { |
68 ui::ScopedLayerAnimationSettings settings(layer_->GetAnimator()); | 73 ui::ScopedLayerAnimationSettings settings(layer_->GetAnimator()); |
69 settings.SetTransitionDuration(duration); | 74 settings.SetTransitionDuration(duration); |
70 settings.SetPreemptionStrategy(ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS); | 75 settings.SetPreemptionStrategy(ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS); |
71 layer_->SetOpacity(0.0f); | 76 layer_->SetOpacity(0.0f); |
72 } | 77 } |
73 | 78 |
74 } // namespace ash | 79 } // namespace ash |
OLD | NEW |