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

Unified Diff: cc/output/gl_renderer.h

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.h
diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h
index cf672f0afa466abe044e6f7af9246c55da28b182..b923f3ffa05d7c4c0e88893e1987a6b809a4218e 100644
--- a/cc/output/gl_renderer.h
+++ b/cc/output/gl_renderer.h
@@ -66,7 +66,8 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
virtual void DoNoOp() OVERRIDE;
virtual void SwapBuffers(const CompositorFrameMetadata& metadata) OVERRIDE;
- virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE;
+ virtual void GetFramebufferPixels(void* pixels,
+ const gfx::Rect& rect) OVERRIDE;
virtual bool IsContextLost() OVERRIDE;
@@ -97,11 +98,11 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
return shared_geometry_.get();
}
- void GetFramebufferPixelsAsync(gfx::Rect rect,
+ void GetFramebufferPixelsAsync(const gfx::Rect& rect,
scoped_ptr<CopyOutputRequest> request);
void GetFramebufferTexture(unsigned texture_id,
ResourceFormat texture_format,
- gfx::Rect device_rect);
+ const gfx::Rect& device_rect);
void ReleaseRenderPassTextures();
void SetStencilEnabled(bool enabled);
@@ -112,9 +113,9 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE;
virtual bool BindFramebufferToTexture(DrawingFrame* frame,
const ScopedResource* resource,
- gfx::Rect target_rect) OVERRIDE;
- virtual void SetDrawViewport(gfx::Rect window_space_viewport) OVERRIDE;
- virtual void SetScissorTestRect(gfx::Rect scissor_rect) OVERRIDE;
+ const gfx::Rect& target_rect) OVERRIDE;
+ virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) OVERRIDE;
+ virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) OVERRIDE;
virtual void DiscardPixels(bool has_external_stencil_test,
bool draw_rect_covers_full_surface) OVERRIDE;
virtual void ClearFramebuffer(DrawingFrame* frame,
@@ -186,13 +187,13 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
void CopyTextureToFramebuffer(const DrawingFrame* frame,
int texture_id,
- gfx::Rect rect,
+ const gfx::Rect& rect,
const gfx::Transform& draw_matrix,
bool flip_vertically);
bool UseScopedTexture(DrawingFrame* frame,
const ScopedResource* resource,
- gfx::Rect viewport_rect);
+ const gfx::Rect& viewport_rect);
bool MakeContextCurrent();
@@ -204,7 +205,7 @@ class CC_EXPORT GLRenderer : public DirectRenderer {
AsyncGetFramebufferPixelsCleanupCallback;
void DoGetFramebufferPixels(
uint8* pixels,
- gfx::Rect window_rect,
+ const gfx::Rect& window_rect,
const AsyncGetFramebufferPixelsCleanupCallback& cleanup_callback);
void FinishedReadback(
const AsyncGetFramebufferPixelsCleanupCallback& cleanup_callback,
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698