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

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

Issue 1065463002: cc: Remove GLC macro (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « cc/output/geometry_binding.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_deque.h" 10 #include "cc/base/scoped_ptr_deque.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 const RendererCapabilitiesImpl& Capabilities() const override; 61 const RendererCapabilitiesImpl& Capabilities() const override;
62 62
63 // Waits for rendering to finish. 63 // Waits for rendering to finish.
64 void Finish() override; 64 void Finish() override;
65 65
66 void DoNoOp() override; 66 void DoNoOp() override;
67 void SwapBuffers(const CompositorFrameMetadata& metadata) override; 67 void SwapBuffers(const CompositorFrameMetadata& metadata) override;
68 68
69 virtual bool IsContextLost(); 69 virtual bool IsContextLost();
70 70
71 static void DebugGLCall(gpu::gles2::GLES2Interface* gl,
72 const char* command,
73 const char* file,
74 int line);
75
76 protected: 71 protected:
77 GLRenderer(RendererClient* client, 72 GLRenderer(RendererClient* client,
78 const RendererSettings* settings, 73 const RendererSettings* settings,
79 OutputSurface* output_surface, 74 OutputSurface* output_surface,
80 ResourceProvider* resource_provider, 75 ResourceProvider* resource_provider,
81 TextureMailboxDeleter* texture_mailbox_deleter, 76 TextureMailboxDeleter* texture_mailbox_deleter,
82 int highp_threshold_min); 77 int highp_threshold_min);
83 78
84 void DidChangeVisibility() override; 79 void DidChangeVisibility() override;
85 80
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 bool use_sync_query_; 505 bool use_sync_query_;
511 bool use_blend_equation_advanced_; 506 bool use_blend_equation_advanced_;
512 bool use_blend_equation_advanced_coherent_; 507 bool use_blend_equation_advanced_coherent_;
513 508
514 SkBitmap on_demand_tile_raster_bitmap_; 509 SkBitmap on_demand_tile_raster_bitmap_;
515 ResourceProvider::ResourceId on_demand_tile_raster_resource_id_; 510 ResourceProvider::ResourceId on_demand_tile_raster_resource_id_;
516 BoundGeometry bound_geometry_; 511 BoundGeometry bound_geometry_;
517 DISALLOW_COPY_AND_ASSIGN(GLRenderer); 512 DISALLOW_COPY_AND_ASSIGN(GLRenderer);
518 }; 513 };
519 514
520 // Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL
521 // call made by the compositor. Useful for debugging rendering issues but
522 // will significantly degrade performance.
523 #define DEBUG_GL_CALLS 0
524
525 #if DEBUG_GL_CALLS && !defined(NDEBUG)
526 #define GLC(context, x) \
527 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__))
528 #else
529 #define GLC(context, x) (x)
530 #endif
531
532 } // namespace cc 515 } // namespace cc
533 516
534 #endif // CC_OUTPUT_GL_RENDERER_H_ 517 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/output/geometry_binding.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698