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

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

Issue 2061993003: Pass responsibility for IOSurface-texture reuse to the gpu process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp85_query_in_use
Patch Set: Rebase. Created 4 years, 6 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/DEPS ('k') | cc/output/gl_renderer.h » ('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 <unordered_map> 8 #include <unordered_map>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
13 #include "cc/output/ca_layer_overlay.h" 13 #include "cc/output/ca_layer_overlay.h"
14 #include "cc/output/overlay_processor.h" 14 #include "cc/output/overlay_processor.h"
15 #include "cc/output/renderer.h" 15 #include "cc/output/renderer.h"
16 #include "cc/quads/tile_draw_quad.h" 16 #include "cc/quads/tile_draw_quad.h"
17 #include "cc/raster/task_graph_runner.h" 17 #include "cc/raster/task_graph_runner.h"
18 #include "cc/resources/resource_provider.h" 18 #include "cc/resources/resource_provider.h"
19 #include "cc/resources/scoped_resource.h" 19 #include "cc/resources/scoped_resource.h"
20 #include "gpu/command_buffer/common/texture_in_use_response.h"
20 #include "ui/gfx/geometry/quad_f.h" 21 #include "ui/gfx/geometry/quad_f.h"
21 22
22 namespace cc { 23 namespace cc {
23 class DrawPolygon; 24 class DrawPolygon;
24 class ResourceProvider; 25 class ResourceProvider;
25 26
26 // This is the base class for code shared between the GL and software 27 // This is the base class for code shared between the GL and software
27 // renderer implementations. "Direct" refers to the fact that it does not 28 // renderer implementations. "Direct" refers to the fact that it does not
28 // delegate rendering to another compositor. 29 // delegate rendering to another compositor.
29 class CC_EXPORT DirectRenderer : public Renderer { 30 class CC_EXPORT DirectRenderer : public Renderer {
30 public: 31 public:
31 ~DirectRenderer() override; 32 ~DirectRenderer() override;
32 33
33 void DecideRenderPassAllocationsForFrame( 34 void DecideRenderPassAllocationsForFrame(
34 const RenderPassList& render_passes_in_draw_order) override; 35 const RenderPassList& render_passes_in_draw_order) override;
35 bool HasAllocatedResourcesForTesting(RenderPassId id) const override; 36 bool HasAllocatedResourcesForTesting(RenderPassId id) const override;
36 void DrawFrame(RenderPassList* render_passes_in_draw_order, 37 void DrawFrame(RenderPassList* render_passes_in_draw_order,
37 float device_scale_factor, 38 float device_scale_factor,
38 const gfx::Rect& device_viewport_rect, 39 const gfx::Rect& device_viewport_rect,
39 const gfx::Rect& device_clip_rect, 40 const gfx::Rect& device_clip_rect,
40 bool disable_picture_quad_image_filtering) override; 41 bool disable_picture_quad_image_filtering) override;
41 virtual void SwapBuffersComplete() {} 42 virtual void SwapBuffersComplete() {}
43 virtual void DidReceiveTextureInUseResponses(
44 const gpu::TextureInUseResponses& responses) {}
42 45
43 // If a pass contains a single tile draw quad and can be drawn without 46 // If a pass contains a single tile draw quad and can be drawn without
44 // a render pass (e.g. applying a filter directly to the tile quad) 47 // a render pass (e.g. applying a filter directly to the tile quad)
45 // return that quad, otherwise return null. 48 // return that quad, otherwise return null.
46 virtual const TileDrawQuad* CanPassBeDrawnDirectly(const RenderPass* pass); 49 virtual const TileDrawQuad* CanPassBeDrawnDirectly(const RenderPass* pass);
47 50
48 struct CC_EXPORT DrawingFrame { 51 struct CC_EXPORT DrawingFrame {
49 DrawingFrame(); 52 DrawingFrame();
50 ~DrawingFrame(); 53 ~DrawingFrame();
51 54
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 179
177 private: 180 private:
178 gfx::Size enlarge_pass_texture_amount_; 181 gfx::Size enlarge_pass_texture_amount_;
179 182
180 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); 183 DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
181 }; 184 };
182 185
183 } // namespace cc 186 } // namespace cc
184 187
185 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ 188 #endif // CC_OUTPUT_DIRECT_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/DEPS ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698