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

Side by Side Diff: cc/output/gl_renderer.h

Issue 53633003: Do not give GPU memory to backgrounded compositors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove test Created 7 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/output/delegating_renderer.cc ('k') | cc/output/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 CC_OUTPUT_GL_RENDERER_H_ 5 #ifndef CC_OUTPUT_GL_RENDERER_H_
6 #define CC_OUTPUT_GL_RENDERER_H_ 6 #define CC_OUTPUT_GL_RENDERER_H_
7 7
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/base/scoped_ptr_vector.h" 10 #include "cc/base/scoped_ptr_vector.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE; 66 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) OVERRIDE;
67 67
68 virtual bool IsContextLost() OVERRIDE; 68 virtual bool IsContextLost() OVERRIDE;
69 69
70 virtual void SetVisible(bool visible) OVERRIDE; 70 virtual void SetVisible(bool visible) OVERRIDE;
71 71
72 virtual void SendManagedMemoryStats(size_t bytes_visible, 72 virtual void SendManagedMemoryStats(size_t bytes_visible,
73 size_t bytes_visible_and_nearby, 73 size_t bytes_visible_and_nearby,
74 size_t bytes_allocated) OVERRIDE; 74 size_t bytes_allocated) OVERRIDE;
75 75
76 virtual void SetDiscardBackBufferWhenNotVisible(bool discard) OVERRIDE;
77
78 static void DebugGLCall(WebKit::WebGraphicsContext3D* context, 76 static void DebugGLCall(WebKit::WebGraphicsContext3D* context,
79 const char* command, 77 const char* command,
80 const char* file, 78 const char* file,
81 int line); 79 int line);
82 80
83 bool CanUseSkiaGPUBackend() const; 81 bool CanUseSkiaGPUBackend() const;
84 82
85 protected: 83 protected:
86 GLRenderer(RendererClient* client, 84 GLRenderer(RendererClient* client,
87 const LayerTreeSettings* settings, 85 const LayerTreeSettings* settings,
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 429
432 skia::RefPtr<GrContext> gr_context_; 430 skia::RefPtr<GrContext> gr_context_;
433 skia::RefPtr<SkCanvas> sk_canvas_; 431 skia::RefPtr<SkCanvas> sk_canvas_;
434 432
435 TextureMailboxDeleter* texture_mailbox_deleter_; 433 TextureMailboxDeleter* texture_mailbox_deleter_;
436 434
437 gfx::Rect swap_buffer_rect_; 435 gfx::Rect swap_buffer_rect_;
438 gfx::Rect scissor_rect_; 436 gfx::Rect scissor_rect_;
439 gfx::Rect viewport_; 437 gfx::Rect viewport_;
440 bool is_backbuffer_discarded_; 438 bool is_backbuffer_discarded_;
441 bool discard_backbuffer_when_not_visible_;
442 bool is_using_bind_uniform_; 439 bool is_using_bind_uniform_;
443 bool visible_; 440 bool visible_;
444 bool is_scissor_enabled_; 441 bool is_scissor_enabled_;
445 bool stencil_shadow_; 442 bool stencil_shadow_;
446 bool blend_shadow_; 443 bool blend_shadow_;
447 unsigned program_shadow_; 444 unsigned program_shadow_;
448 TexturedQuadDrawCache draw_cache_; 445 TexturedQuadDrawCache draw_cache_;
449 int highp_threshold_min_; 446 int highp_threshold_min_;
450 int highp_threshold_cache_; 447 int highp_threshold_cache_;
451 448
(...skipping 18 matching lines...) Expand all
470 #if DEBUG_GL_CALLS && !defined(NDEBUG) 467 #if DEBUG_GL_CALLS && !defined(NDEBUG)
471 #define GLC(context, x) \ 468 #define GLC(context, x) \
472 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) 469 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__))
473 #else 470 #else
474 #define GLC(context, x) (x) 471 #define GLC(context, x) (x)
475 #endif 472 #endif
476 473
477 } // namespace cc 474 } // namespace cc
478 475
479 #endif // CC_OUTPUT_GL_RENDERER_H_ 476 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698