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

Side by Side Diff: ash/wm/boot_splash_screen_chromeos.cc

Issue 232313002: ozone: Protect X11-specific code under ash/wm (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/wm/system_gesture_event_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
28 28
29 // ui::LayerDelegate overrides: 29 // ui::LayerDelegate overrides:
30 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE { 30 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
31 // It'd be safer to copy the area to a canvas in the constructor and then 31 // It'd be safer to copy the area to a canvas in the constructor and then
32 // copy from that canvas to this one here, but this appears to work (i.e. we 32 // copy from that canvas to this one here, but this appears to work (i.e. we
33 // only call this before we draw our first frame) and it saves us an extra 33 // only call this before we draw our first frame) and it saves us an extra
34 // copy. 34 // copy.
35 // TODO(derat): Instead of copying the data, use GLX_EXT_texture_from_pixmap 35 // TODO(derat): Instead of copying the data, use GLX_EXT_texture_from_pixmap
36 // to create a zero-copy texture (when possible): 36 // to create a zero-copy texture (when possible):
37 // https://codereview.chromium.org/10543125 37 // https://codereview.chromium.org/10543125
38 #if !defined(USE_OZONE)
varkha 2014/04/09 23:46:52 Should this maybe use #if defined(USE_X11) just as
spang 2014/04/10 00:12:03 Yeah, that is probably better.
38 ui::CopyAreaToCanvas(host_->GetAcceleratedWidget(), 39 ui::CopyAreaToCanvas(host_->GetAcceleratedWidget(),
39 host_->GetBounds(), gfx::Point(), canvas); 40 host_->GetBounds(), gfx::Point(), canvas);
41 #else
42 // TODO(spang): Figure out what to do here.
43 NOTIMPLEMENTED();
44 #endif
40 } 45 }
41 46
42 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {} 47 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {}
43 48
44 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { 49 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
45 return base::Closure(); 50 return base::Closure();
46 } 51 }
47 52
48 private: 53 private:
49 aura::WindowTreeHost* host_; // not owned 54 aura::WindowTreeHost* host_; // not owned
(...skipping 17 matching lines...) Expand all
67 72
68 void BootSplashScreen::StartHideAnimation(base::TimeDelta duration) { 73 void BootSplashScreen::StartHideAnimation(base::TimeDelta duration) {
69 ui::ScopedLayerAnimationSettings settings(layer_->GetAnimator()); 74 ui::ScopedLayerAnimationSettings settings(layer_->GetAnimator());
70 settings.SetTransitionDuration(duration); 75 settings.SetTransitionDuration(duration);
71 settings.SetPreemptionStrategy(ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS); 76 settings.SetPreemptionStrategy(ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
72 layer_->SetOpacity(0.0f); 77 layer_->SetOpacity(0.0f);
73 } 78 }
74 79
75 } // namespace internal 80 } // namespace internal
76 } // namespace ash 81 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/system_gesture_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698