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

Unified Diff: cc/output/direct_renderer.h

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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/bsp_walk_action.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/direct_renderer.h
diff --git a/cc/output/direct_renderer.h b/cc/output/direct_renderer.h
index e07cb932e5aff6a1661596ce401a4c365443d441..3399491c058f42e87585f1dffebb5a793b136257 100644
--- a/cc/output/direct_renderer.h
+++ b/cc/output/direct_renderer.h
@@ -9,13 +9,17 @@
#include "base/callback.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "cc/base/cc_export.h"
+#include "cc/base/scoped_ptr_deque.h"
#include "cc/output/overlay_processor.h"
#include "cc/output/renderer.h"
#include "cc/resources/resource_provider.h"
#include "cc/resources/scoped_resource.h"
+#include "cc/resources/task_graph_runner.h"
+#include "ui/gfx/geometry/quad_f.h"
namespace cc {
+class DrawPolygon;
class ResourceProvider;
// This is the base class for code shared between the GL and software
@@ -56,6 +60,10 @@ class CC_EXPORT DirectRenderer : public Renderer {
};
void SetEnlargePassTextureAmountForTesting(const gfx::Vector2d& amount);
+ void DoDrawPolygon(const DrawPolygon& poly,
+ DrawingFrame* frame,
+ const gfx::Rect& render_pass_scissor,
+ bool using_scissor_as_optimization);
protected:
DirectRenderer(RendererClient* client,
@@ -78,16 +86,21 @@ class CC_EXPORT DirectRenderer : public Renderer {
gfx::Rect DeviceClipRectInWindowSpace(const DrawingFrame* frame) const;
static gfx::Rect ComputeScissorRectForRenderPass(const DrawingFrame* frame);
void SetScissorStateForQuad(const DrawingFrame* frame, const DrawQuad& quad);
+ bool ShouldSkipQuad(const DrawQuad& quad,
+ const gfx::Rect& render_pass_scissor);
void SetScissorStateForQuadWithRenderPassScissor(
const DrawingFrame* frame,
const DrawQuad& quad,
- const gfx::Rect& render_pass_scissor,
- bool* should_skip_quad);
+ const gfx::Rect& render_pass_scissor);
void SetScissorTestRectInDrawSpace(const DrawingFrame* frame,
const gfx::Rect& draw_space_rect);
static gfx::Size RenderPassTextureSize(const RenderPass* render_pass);
+ void FlushPolygons(ScopedPtrDeque<DrawPolygon>* poly_list,
+ DrawingFrame* frame,
+ const gfx::Rect& render_pass_scissor,
+ bool using_scissor_as_optimization);
void DrawRenderPass(DrawingFrame* frame, const RenderPass* render_pass);
bool UseRenderPass(DrawingFrame* frame, const RenderPass* render_pass);
@@ -101,7 +114,12 @@ class CC_EXPORT DirectRenderer : public Renderer {
bool draw_rect_covers_full_surface) = 0;
virtual void ClearFramebuffer(DrawingFrame* frame,
bool has_external_stencil_test) = 0;
- virtual void DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) = 0;
+ // clip_region is a (possibly null) pointer to a quad in the same
+ // space as the quad. When non-null only the area of the quad that overlaps
+ // with clip_region will be drawn.
+ virtual void DoDrawQuad(DrawingFrame* frame,
+ const DrawQuad* quad,
+ const gfx::QuadF* clip_region) = 0;
virtual void BeginDrawingFrame(DrawingFrame* frame) = 0;
virtual void FinishDrawingFrame(DrawingFrame* frame) = 0;
virtual void FinishDrawingQuadList();
« no previous file with comments | « cc/output/bsp_walk_action.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698