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

Side by Side Diff: ui/ozone/platform/cast/surface_factory_cast.cc

Issue 1855273002: Update new Surface callsites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: software_output_device was indirectly including skia::refptr, switch to sk_sp<> Created 4 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/ozone/demo/software_renderer.cc ('k') | ui/ozone/platform/drm/gpu/drm_buffer.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/cast/surface_factory_cast.h" 5 #include "ui/ozone/platform/cast/surface_factory_cast.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <EGL/egl.h> 8 #include <EGL/egl.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 30 matching lines...) Expand all
41 gfx::Size GetMinDisplaySize() { 41 gfx::Size GetMinDisplaySize() {
42 return gfx::Size(1280, 720); 42 return gfx::Size(1280, 720);
43 } 43 }
44 44
45 class DummySurface : public SurfaceOzoneCanvas { 45 class DummySurface : public SurfaceOzoneCanvas {
46 public: 46 public:
47 DummySurface() {} 47 DummySurface() {}
48 ~DummySurface() override {} 48 ~DummySurface() override {}
49 49
50 // SurfaceOzoneCanvas implementation: 50 // SurfaceOzoneCanvas implementation:
51 skia::RefPtr<SkSurface> GetSurface() override { return surface_; } 51 sk_sp<SkSurface> GetSurface() override { return surface_; }
52 52
53 void ResizeCanvas(const gfx::Size& viewport_size) override { 53 void ResizeCanvas(const gfx::Size& viewport_size) override {
54 surface_ = skia::AdoptRef(SkSurface::NewRaster(SkImageInfo::MakeN32Premul( 54 surface_ = SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(
55 viewport_size.width(), viewport_size.height()))); 55 viewport_size.width(), viewport_size.height()));
56 } 56 }
57 57
58 void PresentCanvas(const gfx::Rect& damage) override {} 58 void PresentCanvas(const gfx::Rect& damage) override {}
59 59
60 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override { 60 scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() override {
61 return nullptr; 61 return nullptr;
62 } 62 }
63 63
64 private: 64 private:
65 skia::RefPtr<SkSurface> surface_; 65 sk_sp<SkSurface> surface_;
66 66
67 DISALLOW_COPY_AND_ASSIGN(DummySurface); 67 DISALLOW_COPY_AND_ASSIGN(DummySurface);
68 }; 68 };
69 69
70 } // namespace 70 } // namespace
71 71
72 SurfaceFactoryCast::SurfaceFactoryCast() : SurfaceFactoryCast(nullptr) {} 72 SurfaceFactoryCast::SurfaceFactoryCast() : SurfaceFactoryCast(nullptr) {}
73 73
74 SurfaceFactoryCast::SurfaceFactoryCast(scoped_ptr<CastEglPlatform> egl_platform) 74 SurfaceFactoryCast::SurfaceFactoryCast(scoped_ptr<CastEglPlatform> egl_platform)
75 : state_(kUninitialized), 75 : state_(kUninitialized),
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 return false; 298 return false;
299 } 299 }
300 300
301 set_gl_get_proc_address.Run(gl_proc); 301 set_gl_get_proc_address.Run(gl_proc);
302 add_gl_library.Run(lib_egl); 302 add_gl_library.Run(lib_egl);
303 add_gl_library.Run(lib_gles2); 303 add_gl_library.Run(lib_gles2);
304 return true; 304 return true;
305 } 305 }
306 306
307 } // namespace ui 307 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/demo/software_renderer.cc ('k') | ui/ozone/platform/drm/gpu/drm_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698