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

Side by Side Diff: cc/direct_renderer.h

Issue 11420079: Allow using a larger-than-necessary texture as cached render pass backing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win build fix - filepath literals Created 8 years 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 | « no previous file | cc/direct_renderer.cc » ('j') | cc/gl_renderer_pixeltest.cc » ('J')
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_DIRECT_RENDERER_H_ 5 #ifndef CC_DIRECT_RENDERER_H_
6 #define CC_DIRECT_RENDERER_H_ 6 #define CC_DIRECT_RENDERER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "cc/renderer.h" 10 #include "cc/renderer.h"
(...skipping 26 matching lines...) Expand all
37 const RenderPass* currentRenderPass; 37 const RenderPass* currentRenderPass;
38 const ScopedResource* currentTexture; 38 const ScopedResource* currentTexture;
39 39
40 gfx::RectF rootDamageRect; 40 gfx::RectF rootDamageRect;
41 41
42 gfx::Transform projectionMatrix; 42 gfx::Transform projectionMatrix;
43 gfx::Transform windowMatrix; 43 gfx::Transform windowMatrix;
44 bool flippedY; 44 bool flippedY;
45 }; 45 };
46 46
47 void setEnlargePassTextureAmountForTesting(gfx::Vector2d amount);
48
47 protected: 49 protected:
48 DirectRenderer(RendererClient* client, ResourceProvider* resourceProvider); 50 DirectRenderer(RendererClient* client, ResourceProvider* resourceProvider);
49 51
50 class CachedResource : public ScopedResource { 52 class CachedResource : public ScopedResource {
51 public: 53 public:
52 static scoped_ptr<CachedResource> create(ResourceProvider* resourceProvi der) { 54 static scoped_ptr<CachedResource> create(ResourceProvider* resourceProvi der) {
53 return make_scoped_ptr(new CachedResource(resourceProvider)); 55 return make_scoped_ptr(new CachedResource(resourceProvider));
54 } 56 }
55 virtual ~CachedResource() {} 57 virtual ~CachedResource() {}
56 58
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 virtual void finishDrawingFrame(DrawingFrame&) = 0; 97 virtual void finishDrawingFrame(DrawingFrame&) = 0;
96 virtual void finishDrawingQuadList(); 98 virtual void finishDrawingQuadList();
97 virtual bool flippedFramebuffer() const = 0; 99 virtual bool flippedFramebuffer() const = 0;
98 virtual void ensureScissorTestEnabled() = 0; 100 virtual void ensureScissorTestEnabled() = 0;
99 virtual void ensureScissorTestDisabled() = 0; 101 virtual void ensureScissorTestDisabled() = 0;
100 102
101 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures; 103 ScopedPtrHashMap<RenderPass::Id, CachedResource> m_renderPassTextures;
102 ResourceProvider* m_resourceProvider; 104 ResourceProvider* m_resourceProvider;
103 105
104 private: 106 private:
107
108 gfx::Vector2d m_enlargePassTextureAmount;
109
105 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); 110 DISALLOW_COPY_AND_ASSIGN(DirectRenderer);
106 }; 111 };
107 112
108 } // namespace cc 113 } // namespace cc
109 114
110 #endif // CC_DIRECT_RENDERER_H_ 115 #endif // CC_DIRECT_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/direct_renderer.cc » ('j') | cc/gl_renderer_pixeltest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698