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

Side by Side Diff: cc/gl_renderer.h

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScaleAsVector Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/geometry.h ('k') | cc/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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 CCRendererGL_h 5 #ifndef CCRendererGL_h
6 #define CCRendererGL_h 6 #define CCRendererGL_h
7 7
8 #include "cc/checkerboard_draw_quad.h" 8 #include "cc/checkerboard_draw_quad.h"
9 #include "cc/debug_border_draw_quad.h" 9 #include "cc/debug_border_draw_quad.h"
10 #include "cc/direct_renderer.h" 10 #include "cc/direct_renderer.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 virtual void viewportChanged() OVERRIDE; 44 virtual void viewportChanged() OVERRIDE;
45 45
46 // waits for rendering to finish 46 // waits for rendering to finish
47 virtual void finish() OVERRIDE; 47 virtual void finish() OVERRIDE;
48 48
49 virtual void doNoOp() OVERRIDE; 49 virtual void doNoOp() OVERRIDE;
50 // puts backbuffer onscreen 50 // puts backbuffer onscreen
51 virtual bool swapBuffers() OVERRIDE; 51 virtual bool swapBuffers() OVERRIDE;
52 52
53 virtual void getFramebufferPixels(void *pixels, const IntRect&) OVERRIDE; 53 virtual void getFramebufferPixels(void *pixels, const gfx::Rect&) OVERRIDE;
54 54
55 virtual bool isContextLost() OVERRIDE; 55 virtual bool isContextLost() OVERRIDE;
56 56
57 virtual void setVisible(bool) OVERRIDE; 57 virtual void setVisible(bool) OVERRIDE;
58 58
59 virtual void sendManagedMemoryStats(size_t bytesVisible, size_t bytesVisible AndNearby, size_t bytesAllocated) OVERRIDE; 59 virtual void sendManagedMemoryStats(size_t bytesVisible, size_t bytesVisible AndNearby, size_t bytesAllocated) OVERRIDE;
60 60
61 protected: 61 protected:
62 GLRenderer(RendererClient*, ResourceProvider*); 62 GLRenderer(RendererClient*, ResourceProvider*);
63 63
64 static void debugGLCall(WebKit::WebGraphicsContext3D*, const char* command, const char* file, int line); 64 static void debugGLCall(WebKit::WebGraphicsContext3D*, const char* command, const char* file, int line);
65 65
66 bool isFramebufferDiscarded() const { return m_isFramebufferDiscarded; } 66 bool isFramebufferDiscarded() const { return m_isFramebufferDiscarded; }
67 bool initialize(); 67 bool initialize();
68 68
69 const FloatQuad& sharedGeometryQuad() const { return m_sharedGeometryQuad; } 69 const FloatQuad& sharedGeometryQuad() const { return m_sharedGeometryQuad; }
70 const GeometryBinding* sharedGeometry() const { return m_sharedGeometry.get( ); } 70 const GeometryBinding* sharedGeometry() const { return m_sharedGeometry.get( ); }
71 71
72 bool getFramebufferTexture(ScopedTexture*, const IntRect& deviceRect); 72 bool getFramebufferTexture(ScopedTexture*, const gfx::Rect& deviceRect);
73 void releaseRenderPassTextures(); 73 void releaseRenderPassTextures();
74 74
75 virtual void bindFramebufferToOutputSurface(DrawingFrame&) OVERRIDE; 75 virtual void bindFramebufferToOutputSurface(DrawingFrame&) OVERRIDE;
76 virtual bool bindFramebufferToTexture(DrawingFrame&, const ScopedTexture*, c onst gfx::Rect& framebufferRect) OVERRIDE; 76 virtual bool bindFramebufferToTexture(DrawingFrame&, const ScopedTexture*, c onst gfx::Rect& framebufferRect) OVERRIDE;
77 virtual void setDrawViewportSize(const gfx::Size&) OVERRIDE; 77 virtual void setDrawViewportSize(const gfx::Size&) OVERRIDE;
78 virtual void enableScissorTestRect(const gfx::Rect& scissorRect) OVERRIDE; 78 virtual void enableScissorTestRect(const gfx::Rect& scissorRect) OVERRIDE;
79 virtual void disableScissorTest() OVERRIDE; 79 virtual void disableScissorTest() OVERRIDE;
80 virtual void clearFramebuffer(DrawingFrame&) OVERRIDE; 80 virtual void clearFramebuffer(DrawingFrame&) OVERRIDE;
81 virtual void drawQuad(DrawingFrame&, const DrawQuad*) OVERRIDE; 81 virtual void drawQuad(DrawingFrame&, const DrawQuad*) OVERRIDE;
82 virtual void beginDrawingFrame(DrawingFrame&) OVERRIDE; 82 virtual void beginDrawingFrame(DrawingFrame&) OVERRIDE;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 #if DEBUG_GL_CALLS && !defined(NDEBUG) 227 #if DEBUG_GL_CALLS && !defined(NDEBUG)
228 #define GLC(context, x) (x, GLRenderer::debugGLCall(&*context, #x, __FILE__, __L INE__)) 228 #define GLC(context, x) (x, GLRenderer::debugGLCall(&*context, #x, __FILE__, __L INE__))
229 #else 229 #else
230 #define GLC(context, x) (x) 230 #define GLC(context, x) (x)
231 #endif 231 #endif
232 232
233 233
234 } 234 }
235 235
236 #endif 236 #endif
OLDNEW
« no previous file with comments | « cc/geometry.h ('k') | cc/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698