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

Side by Side Diff: chrome/browser/ui/window_snapshot/window_snapshot_aura.cc

Issue 10365007: ui: Move compositor/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DEPS Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/window_snapshot/window_snapshot.h" 5 #include "chrome/browser/ui/window_snapshot/window_snapshot.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/compositor/compositor.h"
11 #include "ui/compositor/layer.h"
10 #include "ui/gfx/codec/png_codec.h" 12 #include "ui/gfx/codec/png_codec.h"
11 #include "ui/gfx/compositor/compositor.h"
12 #include "ui/gfx/compositor/layer.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 14
15 namespace browser { 15 namespace browser {
16 16
17 bool GrabWindowSnapshot(gfx::NativeWindow window, 17 bool GrabWindowSnapshot(gfx::NativeWindow window,
18 std::vector<unsigned char>* png_representation, 18 std::vector<unsigned char>* png_representation,
19 const gfx::Rect& snapshot_bounds) { 19 const gfx::Rect& snapshot_bounds) {
20 ui::Compositor* compositor = window->layer()->GetCompositor(); 20 ui::Compositor* compositor = window->layer()->GetCompositor();
21 21
22 gfx::Rect read_pixels_bounds = snapshot_bounds; 22 gfx::Rect read_pixels_bounds = snapshot_bounds;
(...skipping 16 matching lines...) Expand all
39 39
40 gfx::PNGCodec::Encode(pixels, gfx::PNGCodec::FORMAT_BGRA, 40 gfx::PNGCodec::Encode(pixels, gfx::PNGCodec::FORMAT_BGRA,
41 snapshot_bounds.size(), 41 snapshot_bounds.size(),
42 bitmap.rowBytes(), true, 42 bitmap.rowBytes(), true,
43 std::vector<gfx::PNGCodec::Comment>(), 43 std::vector<gfx::PNGCodec::Comment>(),
44 png_representation); 44 png_representation);
45 return true; 45 return true;
46 } 46 }
47 47
48 } // namespace browser 48 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698