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

Side by Side Diff: ui/gl/gl_surface_ozone.cc

Issue 1417753007: ui: Revert gfx::BufferUsage::SCANOUT to gfx::BufferUsage::GPU_READ_WRITE change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/buffer_types.h ('k') | ui/ozone/demo/surfaceless_gl_renderer.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/gl/gl_surface.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 563
564 bool GLSurfaceOzoneSurfacelessSurfaceImpl::CreatePixmaps() { 564 bool GLSurfaceOzoneSurfacelessSurfaceImpl::CreatePixmaps() {
565 if (!fbo_) 565 if (!fbo_)
566 return true; 566 return true;
567 for (size_t i = 0; i < arraysize(textures_); i++) { 567 for (size_t i = 0; i < arraysize(textures_); i++) {
568 scoped_refptr<ui::NativePixmap> pixmap = 568 scoped_refptr<ui::NativePixmap> pixmap =
569 ui::OzonePlatform::GetInstance() 569 ui::OzonePlatform::GetInstance()
570 ->GetSurfaceFactoryOzone() 570 ->GetSurfaceFactoryOzone()
571 ->CreateNativePixmap(widget_, GetSize(), 571 ->CreateNativePixmap(widget_, GetSize(),
572 gfx::BufferFormat::BGRA_8888, 572 gfx::BufferFormat::BGRA_8888,
573 gfx::BufferUsage::GPU_READ_WRITE); 573 gfx::BufferUsage::SCANOUT);
574 if (!pixmap) 574 if (!pixmap)
575 return false; 575 return false;
576 scoped_refptr<GLImageOzoneNativePixmap> image = 576 scoped_refptr<GLImageOzoneNativePixmap> image =
577 new GLImageOzoneNativePixmap(GetSize(), GL_BGRA_EXT); 577 new GLImageOzoneNativePixmap(GetSize(), GL_BGRA_EXT);
578 if (!image->Initialize(pixmap.get(), gfx::BufferFormat::BGRA_8888)) 578 if (!image->Initialize(pixmap.get(), gfx::BufferFormat::BGRA_8888))
579 return false; 579 return false;
580 images_[i] = image; 580 images_[i] = image;
581 // Bind image to texture. 581 // Bind image to texture.
582 ScopedTextureBinder binder(GL_TEXTURE_2D, textures_[i]); 582 ScopedTextureBinder binder(GL_TEXTURE_2D, textures_[i]);
583 if (!images_[i]->BindTexImage(GL_TEXTURE_2D)) 583 if (!images_[i]->BindTexImage(GL_TEXTURE_2D))
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 } 714 }
715 } 715 }
716 716
717 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { 717 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
718 return ui::OzonePlatform::GetInstance() 718 return ui::OzonePlatform::GetInstance()
719 ->GetSurfaceFactoryOzone() 719 ->GetSurfaceFactoryOzone()
720 ->GetNativeDisplay(); 720 ->GetNativeDisplay();
721 } 721 }
722 722
723 } // namespace gfx 723 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/buffer_types.h ('k') | ui/ozone/demo/surfaceless_gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698