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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2823003002: SkBitmap and SkPixelRef no longer need lock/unlock (Closed)
Patch Set: win fix after rebase Created 3 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 void DesktopWindowTreeHostX11::SerializeImageRepresentation( 1880 void DesktopWindowTreeHostX11::SerializeImageRepresentation(
1881 const gfx::ImageSkiaRep& rep, 1881 const gfx::ImageSkiaRep& rep,
1882 std::vector<unsigned long>* data) { 1882 std::vector<unsigned long>* data) {
1883 int width = rep.GetWidth(); 1883 int width = rep.GetWidth();
1884 data->push_back(width); 1884 data->push_back(width);
1885 1885
1886 int height = rep.GetHeight(); 1886 int height = rep.GetHeight();
1887 data->push_back(height); 1887 data->push_back(height);
1888 1888
1889 const SkBitmap& bitmap = rep.sk_bitmap(); 1889 const SkBitmap& bitmap = rep.sk_bitmap();
1890 SkAutoLockPixels locker(bitmap);
1891 1890
1892 for (int y = 0; y < height; ++y) 1891 for (int y = 0; y < height; ++y)
1893 for (int x = 0; x < width; ++x) 1892 for (int x = 0; x < width; ++x)
1894 data->push_back(bitmap.getColor(x, y)); 1893 data->push_back(bitmap.getColor(x, y));
1895 } 1894 }
1896 1895
1897 std::list<XID>& DesktopWindowTreeHostX11::open_windows() { 1896 std::list<XID>& DesktopWindowTreeHostX11::open_windows() {
1898 if (!open_windows_) 1897 if (!open_windows_)
1899 open_windows_ = new std::list<XID>(); 1898 open_windows_ = new std::list<XID>();
1900 return *open_windows_; 1899 return *open_windows_;
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 2353
2355 // static 2354 // static
2356 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 2355 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
2357 internal::NativeWidgetDelegate* native_widget_delegate, 2356 internal::NativeWidgetDelegate* native_widget_delegate,
2358 DesktopNativeWidgetAura* desktop_native_widget_aura) { 2357 DesktopNativeWidgetAura* desktop_native_widget_aura) {
2359 return new DesktopWindowTreeHostX11(native_widget_delegate, 2358 return new DesktopWindowTreeHostX11(native_widget_delegate,
2360 desktop_native_widget_aura); 2359 desktop_native_widget_aura);
2361 } 2360 }
2362 2361
2363 } // namespace views 2362 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698