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

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

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « cc/layers/solid_color_layer_impl.cc ('k') | cc/output/direct_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_DIRECT_RENDERER_H_ 5 #ifndef CC_OUTPUT_DIRECT_RENDERER_H_
6 #define CC_OUTPUT_DIRECT_RENDERER_H_ 6 #define CC_OUTPUT_DIRECT_RENDERER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ResourceProvider* resource_provider); 64 ResourceProvider* resource_provider);
65 65
66 static gfx::RectF QuadVertexRect(); 66 static gfx::RectF QuadVertexRect();
67 static void QuadRectTransform(gfx::Transform* quad_rect_transform, 67 static void QuadRectTransform(gfx::Transform* quad_rect_transform,
68 const gfx::Transform& quad_transform, 68 const gfx::Transform& quad_transform,
69 const gfx::RectF& quad_rect); 69 const gfx::RectF& quad_rect);
70 void InitializeViewport(DrawingFrame* frame, 70 void InitializeViewport(DrawingFrame* frame,
71 const gfx::Rect& draw_rect, 71 const gfx::Rect& draw_rect,
72 const gfx::Rect& viewport_rect, 72 const gfx::Rect& viewport_rect,
73 const gfx::Size& surface_size); 73 const gfx::Size& surface_size);
74 gfx::Rect MoveFromDrawToWindowSpace(const gfx::Rect& draw_rect) const; 74 gfx::Rect MoveFromDrawToWindowSpace(const DrawingFrame* frame,
75 const gfx::Rect& draw_rect) const;
75 76
76 bool NeedDeviceClip(const DrawingFrame* frame) const; 77 bool NeedDeviceClip(const DrawingFrame* frame) const;
77 gfx::Rect DeviceClipRectInWindowSpace(const DrawingFrame* frame) const; 78 gfx::Rect DeviceClipRectInWindowSpace(const DrawingFrame* frame) const;
78 static gfx::Rect ComputeScissorRectForRenderPass(const DrawingFrame* frame); 79 static gfx::Rect ComputeScissorRectForRenderPass(const DrawingFrame* frame);
79 void SetScissorStateForQuad(const DrawingFrame* frame, const DrawQuad& quad); 80 void SetScissorStateForQuad(const DrawingFrame* frame, const DrawQuad& quad);
80 void SetScissorStateForQuadWithRenderPassScissor( 81 void SetScissorStateForQuadWithRenderPassScissor(
81 const DrawingFrame* frame, 82 const DrawingFrame* frame,
82 const DrawQuad& quad, 83 const DrawQuad& quad,
83 const gfx::Rect& render_pass_scissor, 84 const gfx::Rect& render_pass_scissor,
84 bool* should_skip_quad); 85 bool* should_skip_quad);
(...skipping 12 matching lines...) Expand all
97 virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) = 0; 98 virtual void SetDrawViewport(const gfx::Rect& window_space_viewport) = 0;
98 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; 99 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0;
99 virtual void DiscardPixels(bool has_external_stencil_test, 100 virtual void DiscardPixels(bool has_external_stencil_test,
100 bool draw_rect_covers_full_surface) = 0; 101 bool draw_rect_covers_full_surface) = 0;
101 virtual void ClearFramebuffer(DrawingFrame* frame, 102 virtual void ClearFramebuffer(DrawingFrame* frame,
102 bool has_external_stencil_test) = 0; 103 bool has_external_stencil_test) = 0;
103 virtual void DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) = 0; 104 virtual void DoDrawQuad(DrawingFrame* frame, const DrawQuad* quad) = 0;
104 virtual void BeginDrawingFrame(DrawingFrame* frame) = 0; 105 virtual void BeginDrawingFrame(DrawingFrame* frame) = 0;
105 virtual void FinishDrawingFrame(DrawingFrame* frame) = 0; 106 virtual void FinishDrawingFrame(DrawingFrame* frame) = 0;
106 virtual void FinishDrawingQuadList(); 107 virtual void FinishDrawingQuadList();
107 virtual bool FlippedFramebuffer() const = 0; 108 virtual bool FlippedFramebuffer(const DrawingFrame* frame) const = 0;
108 virtual void EnsureScissorTestEnabled() = 0; 109 virtual void EnsureScissorTestEnabled() = 0;
109 virtual void EnsureScissorTestDisabled() = 0; 110 virtual void EnsureScissorTestDisabled() = 0;
110 virtual void DiscardBackbuffer() {} 111 virtual void DiscardBackbuffer() {}
111 virtual void EnsureBackbuffer() {} 112 virtual void EnsureBackbuffer() {}
112 113
113 virtual void CopyCurrentRenderPassToBitmap( 114 virtual void CopyCurrentRenderPassToBitmap(
114 DrawingFrame* frame, 115 DrawingFrame* frame,
115 scoped_ptr<CopyOutputRequest> request) = 0; 116 scoped_ptr<CopyOutputRequest> request) = 0;
116 117
117 base::ScopedPtrHashMap<RenderPassId, ScopedResource> render_pass_textures_; 118 base::ScopedPtrHashMap<RenderPassId, ScopedResource> render_pass_textures_;
(...skipping 12 matching lines...) Expand all
130 131
131 private: 132 private:
132 gfx::Vector2d enlarge_pass_texture_amount_; 133 gfx::Vector2d enlarge_pass_texture_amount_;
133 134
134 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); 135 DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
135 }; 136 };
136 137
137 } // namespace cc 138 } // namespace cc
138 139
139 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ 140 #endif // CC_OUTPUT_DIRECT_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/layers/solid_color_layer_impl.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698