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

Side by Side Diff: ui/gl/gl_surface.h

Issue 1394403002: Mac Overlays: Plumb through GL solid color overlay support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_GL_GL_SURFACE_H_ 5 #ifndef UI_GL_GL_SURFACE_H_
6 #define UI_GL_GL_SURFACE_H_ 6 #define UI_GL_GL_SURFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // composition. 133 // composition.
134 // |image| to be presented by the overlay. 134 // |image| to be presented by the overlay.
135 // |bounds_rect| specify where it is supposed to be on the screen in pixels. 135 // |bounds_rect| specify where it is supposed to be on the screen in pixels.
136 // |crop_rect| specifies the region within the buffer to be placed inside 136 // |crop_rect| specifies the region within the buffer to be placed inside
137 // |bounds_rect|. 137 // |bounds_rect|.
138 virtual bool ScheduleOverlayPlane(int z_order, 138 virtual bool ScheduleOverlayPlane(int z_order,
139 OverlayTransform transform, 139 OverlayTransform transform,
140 GLImage* image, 140 GLImage* image,
141 const Rect& bounds_rect, 141 const Rect& bounds_rect,
142 const RectF& crop_rect); 142 const RectF& crop_rect);
143 143 // Schedule a solid color overlay plane to be shown at swap time.
144 virtual bool ScheduleSolidColorOverlayPlane(int z_order,
145 const Rect& bounds_rect,
146 float red,
147 float green,
148 float blue,
149 float alpha);
144 virtual bool IsSurfaceless() const; 150 virtual bool IsSurfaceless() const;
145 151
146 // Create a GL surface that renders directly to a view. 152 // Create a GL surface that renders directly to a view.
147 static scoped_refptr<GLSurface> CreateViewGLSurface( 153 static scoped_refptr<GLSurface> CreateViewGLSurface(
148 gfx::AcceleratedWidget window); 154 gfx::AcceleratedWidget window);
149 155
150 #if defined(USE_OZONE) 156 #if defined(USE_OZONE)
151 // Create a GL surface that renders directly into a window with surfaceless 157 // Create a GL surface that renders directly into a window with surfaceless
152 // semantics - there is no default framebuffer and the primary surface must 158 // semantics - there is no default framebuffer and the primary surface must
153 // be presented as an overlay. If surfaceless mode is not supported or 159 // be presented as an overlay. If surfaceless mode is not supported or
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 236
231 private: 237 private:
232 scoped_refptr<GLSurface> surface_; 238 scoped_refptr<GLSurface> surface_;
233 239
234 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); 240 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter);
235 }; 241 };
236 242
237 } // namespace gfx 243 } // namespace gfx
238 244
239 #endif // UI_GL_GL_SURFACE_H_ 245 #endif // UI_GL_GL_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698