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

Side by Side Diff: ui/ozone/demo/surfaceless_gl_renderer.cc

Issue 2613493002: Fix namespace for src/ui/display/. (Closed)
Patch Set: Rebase. Created 3 years, 11 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/ozone_demo.cc ('k') | ui/ozone/platform/cast/ozone_platform_cast.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/demo/surfaceless_gl_renderer.h" 5 #include "ui/ozone/demo/surfaceless_gl_renderer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 21 matching lines...) Expand all
32 glDeleteTextures(1, &gl_tex_); 32 glDeleteTextures(1, &gl_tex_);
33 } 33 }
34 } 34 }
35 35
36 bool SurfacelessGlRenderer::BufferWrapper::Initialize( 36 bool SurfacelessGlRenderer::BufferWrapper::Initialize(
37 gfx::AcceleratedWidget widget, 37 gfx::AcceleratedWidget widget,
38 const gfx::Size& size) { 38 const gfx::Size& size) {
39 glGenFramebuffersEXT(1, &gl_fb_); 39 glGenFramebuffersEXT(1, &gl_fb_);
40 glGenTextures(1, &gl_tex_); 40 glGenTextures(1, &gl_tex_);
41 41
42 gfx::BufferFormat format = ui::DisplaySnapshot::PrimaryFormat(); 42 gfx::BufferFormat format = display::DisplaySnapshot::PrimaryFormat();
43 scoped_refptr<NativePixmap> pixmap = 43 scoped_refptr<NativePixmap> pixmap =
44 OzonePlatform::GetInstance() 44 OzonePlatform::GetInstance()
45 ->GetSurfaceFactoryOzone() 45 ->GetSurfaceFactoryOzone()
46 ->CreateNativePixmap(widget, size, format, gfx::BufferUsage::SCANOUT); 46 ->CreateNativePixmap(widget, size, format, gfx::BufferUsage::SCANOUT);
47 scoped_refptr<ui::GLImageOzoneNativePixmap> image( 47 scoped_refptr<ui::GLImageOzoneNativePixmap> image(
48 new ui::GLImageOzoneNativePixmap(size, GL_RGB)); 48 new ui::GLImageOzoneNativePixmap(size, GL_RGB));
49 if (!image->Initialize(pixmap.get(), format)) { 49 if (!image->Initialize(pixmap.get(), format)) {
50 LOG(ERROR) << "Failed to create GLImage"; 50 LOG(ERROR) << "Failed to create GLImage";
51 return false; 51 return false;
52 } 52 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 case gfx::SwapResult::SWAP_ACK: 133 case gfx::SwapResult::SWAP_ACK:
134 GlRenderer::PostRenderFrameTask(result); 134 GlRenderer::PostRenderFrameTask(result);
135 break; 135 break;
136 case gfx::SwapResult::SWAP_FAILED: 136 case gfx::SwapResult::SWAP_FAILED:
137 LOG(FATAL) << "Failed to swap buffers"; 137 LOG(FATAL) << "Failed to swap buffers";
138 break; 138 break;
139 } 139 }
140 } 140 }
141 141
142 } // namespace ui 142 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/demo/ozone_demo.cc ('k') | ui/ozone/platform/cast/ozone_platform_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698