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

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

Issue 1422563002: [Ozone] Enables overlay render format setting path and by default use UYVY (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 scoped_refptr<ui::NativePixmap> pixmap = 565 scoped_refptr<ui::NativePixmap> pixmap =
566 ui::OzonePlatform::GetInstance() 566 ui::OzonePlatform::GetInstance()
567 ->GetSurfaceFactoryOzone() 567 ->GetSurfaceFactoryOzone()
568 ->CreateNativePixmap(widget_, GetSize(), 568 ->CreateNativePixmap(widget_, GetSize(),
569 gfx::BufferFormat::BGRA_8888, 569 gfx::BufferFormat::BGRA_8888,
570 gfx::BufferUsage::GPU_READ_WRITE); 570 gfx::BufferUsage::GPU_READ_WRITE);
571 if (!pixmap) 571 if (!pixmap)
572 return false; 572 return false;
573 scoped_refptr<GLImageOzoneNativePixmap> image = 573 scoped_refptr<GLImageOzoneNativePixmap> image =
574 new GLImageOzoneNativePixmap(GetSize(), GL_BGRA_EXT); 574 new GLImageOzoneNativePixmap(GetSize(), GL_BGRA_EXT);
575 if (!image->Initialize(pixmap.get(), gfx::BufferFormat::BGRA_8888)) 575 if (!image->Initialize(pixmap.get()))
576 return false; 576 return false;
577 images_[i] = image; 577 images_[i] = image;
578 // Bind image to texture. 578 // Bind image to texture.
579 ScopedTextureBinder binder(GL_TEXTURE_2D, textures_[i]); 579 ScopedTextureBinder binder(GL_TEXTURE_2D, textures_[i]);
580 if (!images_[i]->BindTexImage(GL_TEXTURE_2D)) 580 if (!images_[i]->BindTexImage(GL_TEXTURE_2D))
581 return false; 581 return false;
582 } 582 }
583 return true; 583 return true;
584 } 584 }
585 585
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 } 711 }
712 } 712 }
713 713
714 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() { 714 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
715 return ui::OzonePlatform::GetInstance() 715 return ui::OzonePlatform::GetInstance()
716 ->GetSurfaceFactoryOzone() 716 ->GetSurfaceFactoryOzone()
717 ->GetNativeDisplay(); 717 ->GetNativeDisplay();
718 } 718 }
719 719
720 } // namespace gfx 720 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698