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

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

Issue 2006923006: Move all CARendererLayerTree parameters to separate struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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"
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_implementation.h" 21 #include "ui/gl/gl_implementation.h"
22 22
23 namespace gfx { 23 namespace gfx {
24 class Transform; 24 class Transform;
25 class VSyncProvider; 25 class VSyncProvider;
26 } 26 }
27 27
28 namespace ui {
29 struct CARendererLayerParams;
30 }
31
28 namespace gl { 32 namespace gl {
29 33
30 class GLContext; 34 class GLContext;
31 class GLImage; 35 class GLImage;
32 36
33 // Encapsulates a surface that can be rendered to with GL, hiding platform 37 // Encapsulates a surface that can be rendered to with GL, hiding platform
34 // specific management. 38 // specific management.
35 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { 39 class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
36 public: 40 public:
37 GLSurface(); 41 GLSurface();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // |crop_rect| specifies the region within the buffer to be placed inside 170 // |crop_rect| specifies the region within the buffer to be placed inside
167 // |bounds_rect|. 171 // |bounds_rect|.
168 virtual bool ScheduleOverlayPlane(int z_order, 172 virtual bool ScheduleOverlayPlane(int z_order,
169 gfx::OverlayTransform transform, 173 gfx::OverlayTransform transform,
170 GLImage* image, 174 GLImage* image,
171 const gfx::Rect& bounds_rect, 175 const gfx::Rect& bounds_rect,
172 const gfx::RectF& crop_rect); 176 const gfx::RectF& crop_rect);
173 177
174 // Schedule a CALayer to be shown at swap time. 178 // Schedule a CALayer to be shown at swap time.
175 // All arguments correspond to their CALayer properties. 179 // All arguments correspond to their CALayer properties.
176 virtual bool ScheduleCALayer(GLImage* contents_image, 180 virtual bool ScheduleCALayer(const ui::CARendererLayerParams& params);
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);
187 181
188 virtual bool IsSurfaceless() const; 182 virtual bool IsSurfaceless() const;
189 183
190 virtual bool FlipsVertically() const; 184 virtual bool FlipsVertically() const;
191 185
192 // Returns true if SwapBuffers or PostSubBuffers causes a flip, such that 186 // Returns true if SwapBuffers or PostSubBuffers causes a flip, such that
193 // the next buffer may be 2 frames old. 187 // the next buffer may be 2 frames old.
194 virtual bool BuffersFlipped() const; 188 virtual bool BuffersFlipped() const;
195 189
196 // Create a GL surface that renders directly to a view. 190 // Create a GL surface that renders directly to a view.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 283
290 private: 284 private:
291 scoped_refptr<GLSurface> surface_; 285 scoped_refptr<GLSurface> surface_;
292 286
293 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); 287 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter);
294 }; 288 };
295 289
296 } // namespace gl 290 } // namespace gl
297 291
298 #endif // UI_GL_GL_SURFACE_H_ 292 #endif // UI_GL_GL_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698