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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_window.cc

Issue 1432443004: Remove SkDevice and SkBaseDevice outside skia/ext/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass SkPixmap by pointer to MakeBitmapOpaque Created 5 years, 1 month 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/gfx/nine_image_painter_unittest.cc ('k') | ui/views/view.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ozone/platform/drm/gpu/drm_window.h" 5 #include "ui/ozone/platform/drm/gpu/drm_window.h"
6 6
7 #include <drm_fourcc.h> 7 #include <drm_fourcc.h>
8 8
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
11 #include "third_party/skia/include/core/SkBitmap.h" 11 #include "third_party/skia/include/core/SkBitmap.h"
12 #include "third_party/skia/include/core/SkDevice.h" 12 #include "third_party/skia/include/core/SkCanvas.h"
13 #include "third_party/skia/include/core/SkSurface.h" 13 #include "third_party/skia/include/core/SkSurface.h"
14 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" 14 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
15 #include "ui/ozone/platform/drm/common/drm_util.h" 15 #include "ui/ozone/platform/drm/common/drm_util.h"
16 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" 16 #include "ui/ozone/platform/drm/gpu/crtc_controller.h"
17 #include "ui/ozone/platform/drm/gpu/drm_buffer.h" 17 #include "ui/ozone/platform/drm/gpu/drm_buffer.h"
18 #include "ui/ozone/platform/drm/gpu/drm_device.h" 18 #include "ui/ozone/platform/drm/gpu/drm_device.h"
19 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" 19 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h"
20 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" 20 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h"
21 #include "ui/ozone/platform/drm/gpu/screen_manager.h" 21 #include "ui/ozone/platform/drm/gpu/screen_manager.h"
22 22
(...skipping 11 matching lines...) Expand all
34 34
35 void UpdateCursorImage(DrmBuffer* cursor, const SkBitmap& image) { 35 void UpdateCursorImage(DrmBuffer* cursor, const SkBitmap& image) {
36 SkRect damage; 36 SkRect damage;
37 image.getBounds(&damage); 37 image.getBounds(&damage);
38 38
39 // Clear to transparent in case |image| is smaller than the canvas. 39 // Clear to transparent in case |image| is smaller than the canvas.
40 SkCanvas* canvas = cursor->GetCanvas(); 40 SkCanvas* canvas = cursor->GetCanvas();
41 canvas->clear(SK_ColorTRANSPARENT); 41 canvas->clear(SK_ColorTRANSPARENT);
42 42
43 SkRect clip; 43 SkRect clip;
44 clip.set(0, 0, canvas->getDeviceSize().width(), 44 clip.set(0, 0, canvas->getBaseLayerSize().width(),
45 canvas->getDeviceSize().height()); 45 canvas->getBaseLayerSize().height());
46 canvas->clipRect(clip, SkRegion::kReplace_Op); 46 canvas->clipRect(clip, SkRegion::kReplace_Op);
47 canvas->drawBitmapRect(image, damage, NULL); 47 canvas->drawBitmapRect(image, damage, NULL);
48 } 48 }
49 49
50 } // namespace 50 } // namespace
51 51
52 DrmWindow::DrmWindow(gfx::AcceleratedWidget widget, 52 DrmWindow::DrmWindow(gfx::AcceleratedWidget widget,
53 DrmDeviceManager* device_manager, 53 DrmDeviceManager* device_manager,
54 ScreenManager* screen_manager) 54 ScreenManager* screen_manager)
55 : widget_(widget), 55 : widget_(widget),
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 if (!cursor_buffers_[i]->Initialize( 297 if (!cursor_buffers_[i]->Initialize(
298 info, false /* should_register_framebuffer */)) { 298 info, false /* should_register_framebuffer */)) {
299 LOG(FATAL) << "Failed to initialize cursor buffer"; 299 LOG(FATAL) << "Failed to initialize cursor buffer";
300 return; 300 return;
301 } 301 }
302 } 302 }
303 } 303 }
304 } 304 }
305 305
306 } // namespace ui 306 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gfx/nine_image_painter_unittest.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698