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

Side by Side Diff: content/browser/compositor/software_output_device_ozone.cc

Issue 399953003: ozone: Remove InitializeHardware / ShutdownHardware (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests more Created 6 years, 5 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 | content/browser/compositor/software_output_device_ozone_unittest.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 "content/browser/compositor/software_output_device_ozone.h" 5 #include "content/browser/compositor/software_output_device_ozone.h"
6 #include "third_party/skia/include/core/SkDevice.h" 6 #include "third_party/skia/include/core/SkDevice.h"
7 #include "ui/compositor/compositor.h" 7 #include "ui/compositor/compositor.h"
8 #include "ui/gfx/skia_util.h" 8 #include "ui/gfx/skia_util.h"
9 #include "ui/gfx/vsync_provider.h" 9 #include "ui/gfx/vsync_provider.h"
10 #include "ui/ozone/public/surface_factory_ozone.h" 10 #include "ui/ozone/public/surface_factory_ozone.h"
11 #include "ui/ozone/public/surface_ozone_canvas.h" 11 #include "ui/ozone/public/surface_ozone_canvas.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 SoftwareOutputDeviceOzone::SoftwareOutputDeviceOzone(ui::Compositor* compositor) 15 SoftwareOutputDeviceOzone::SoftwareOutputDeviceOzone(ui::Compositor* compositor)
16 : compositor_(compositor) { 16 : compositor_(compositor) {
17 ui::SurfaceFactoryOzone* factory = ui::SurfaceFactoryOzone::GetInstance(); 17 ui::SurfaceFactoryOzone* factory = ui::SurfaceFactoryOzone::GetInstance();
18 18
19 if (factory->InitializeHardware() != ui::SurfaceFactoryOzone::INITIALIZED)
20 LOG(FATAL) << "Failed to initialize hardware in OZONE";
21
22 surface_ozone_ = factory->CreateCanvasForWidget(compositor_->widget()); 19 surface_ozone_ = factory->CreateCanvasForWidget(compositor_->widget());
23 20
24 if (!surface_ozone_) 21 if (!surface_ozone_)
25 LOG(FATAL) << "Failed to initialize canvas"; 22 LOG(FATAL) << "Failed to initialize canvas";
26 23
27 vsync_provider_ = surface_ozone_->CreateVSyncProvider(); 24 vsync_provider_ = surface_ozone_->CreateVSyncProvider();
28 } 25 }
29 26
30 SoftwareOutputDeviceOzone::~SoftwareOutputDeviceOzone() { 27 SoftwareOutputDeviceOzone::~SoftwareOutputDeviceOzone() {
31 } 28 }
(...skipping 19 matching lines...) Expand all
51 return SoftwareOutputDevice::BeginPaint(damage_rect); 48 return SoftwareOutputDevice::BeginPaint(damage_rect);
52 } 49 }
53 50
54 void SoftwareOutputDeviceOzone::EndPaint(cc::SoftwareFrameData* frame_data) { 51 void SoftwareOutputDeviceOzone::EndPaint(cc::SoftwareFrameData* frame_data) {
55 SoftwareOutputDevice::EndPaint(frame_data); 52 SoftwareOutputDevice::EndPaint(frame_data);
56 53
57 surface_ozone_->PresentCanvas(damage_rect_); 54 surface_ozone_->PresentCanvas(damage_rect_);
58 } 55 }
59 56
60 } // namespace content 57 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/software_output_device_ozone_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698