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

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

Issue 2125673002: Revert of Move all CARendererLayerTree parameters to separate struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/gl/gl.gyp ('k') | ui/gl/gl_surface.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 (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"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/geometry/rect_f.h" 15 #include "ui/gfx/geometry/rect_f.h"
16 #include "ui/gfx/geometry/size.h" 16 #include "ui/gfx/geometry/size.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 #include "ui/gfx/overlay_transform.h" 18 #include "ui/gfx/overlay_transform.h"
19 #include "ui/gfx/swap_result.h" 19 #include "ui/gfx/swap_result.h"
20 #include "ui/gl/gl_export.h" 20 #include "ui/gl/gl_export.h"
21 #include "ui/gl/gl_image.h" 21 #include "ui/gl/gl_image.h"
22 #include "ui/gl/gl_implementation.h" 22 #include "ui/gl/gl_implementation.h"
23 23
24 namespace gfx { 24 namespace gfx {
25 class Transform; 25 class Transform;
26 class VSyncProvider; 26 class VSyncProvider;
27 } 27 }
28 28
29 namespace ui {
30 struct CARendererLayerParams;
31 }
32
33 namespace gl { 29 namespace gl {
34 30
35 class GLContext; 31 class GLContext;
36 32
37 // Encapsulates a surface that can be rendered to with GL, hiding platform 33 // Encapsulates a surface that can be rendered to with GL, hiding platform
38 // specific management. 34 // specific management.
39 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { 35 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
40 public: 36 public:
41 GLSurface(); 37 GLSurface();
42 38
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // |crop_rect| specifies the region within the buffer to be placed inside 166 // |crop_rect| specifies the region within the buffer to be placed inside
171 // |bounds_rect|. 167 // |bounds_rect|.
172 virtual bool ScheduleOverlayPlane(int z_order, 168 virtual bool ScheduleOverlayPlane(int z_order,
173 gfx::OverlayTransform transform, 169 gfx::OverlayTransform transform,
174 GLImage* image, 170 GLImage* image,
175 const gfx::Rect& bounds_rect, 171 const gfx::Rect& bounds_rect,
176 const gfx::RectF& crop_rect); 172 const gfx::RectF& crop_rect);
177 173
178 // Schedule a CALayer to be shown at swap time. 174 // Schedule a CALayer to be shown at swap time.
179 // All arguments correspond to their CALayer properties. 175 // All arguments correspond to their CALayer properties.
180 virtual bool ScheduleCALayer(const ui::CARendererLayerParams& params); 176 virtual bool ScheduleCALayer(GLImage* contents_image,
181 177 const gfx::RectF& contents_rect,
178 float opacity,
179 unsigned background_color,
180 unsigned edge_aa_mask,
181 const gfx::RectF& rect,
182 bool is_clipped,
183 const gfx::RectF& clip_rect,
184 const gfx::Transform& transform,
185 int sorting_content_id,
186 unsigned filter);
182 struct GL_EXPORT CALayerInUseQuery { 187 struct GL_EXPORT CALayerInUseQuery {
183 CALayerInUseQuery(); 188 CALayerInUseQuery();
184 explicit CALayerInUseQuery(const CALayerInUseQuery&); 189 explicit CALayerInUseQuery(const CALayerInUseQuery&);
185 ~CALayerInUseQuery(); 190 ~CALayerInUseQuery();
186 unsigned texture = 0; 191 unsigned texture = 0;
187 scoped_refptr<GLImage> image; 192 scoped_refptr<GLImage> image;
188 }; 193 };
189 virtual void ScheduleCALayerInUseQuery( 194 virtual void ScheduleCALayerInUseQuery(
190 std::vector<CALayerInUseQuery> queries); 195 std::vector<CALayerInUseQuery> queries);
191 196
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 282
278 // Wraps GLSurface in scoped_refptr and tries to initializes it. Returns a 283 // Wraps GLSurface in scoped_refptr and tries to initializes it. Returns a
279 // scoped_refptr containing the initialized GLSurface or nullptr if 284 // scoped_refptr containing the initialized GLSurface or nullptr if
280 // initialization fails. 285 // initialization fails.
281 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface( 286 GL_EXPORT scoped_refptr<GLSurface> InitializeGLSurface(
282 scoped_refptr<GLSurface> surface); 287 scoped_refptr<GLSurface> surface);
283 288
284 } // namespace gl 289 } // namespace gl
285 290
286 #endif // UI_GL_GL_SURFACE_H_ 291 #endif // UI_GL_GL_SURFACE_H_
OLDNEW
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698