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

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

Issue 15579002: Implement transform/clip support for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turn on fuzzy comparator for new SoftwareRenderer tests Created 7 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
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_vector.h" 10 #include "cc/base/scoped_ptr_vector.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 void GetFramebufferPixelsAsync(gfx::Rect rect, 98 void GetFramebufferPixelsAsync(gfx::Rect rect,
99 bool flipped_y, 99 bool flipped_y,
100 scoped_ptr<CopyOutputRequest> request); 100 scoped_ptr<CopyOutputRequest> request);
101 bool GetFramebufferTexture(ScopedResource* resource, gfx::Rect device_rect); 101 bool GetFramebufferTexture(ScopedResource* resource, gfx::Rect device_rect);
102 void ReleaseRenderPassTextures(); 102 void ReleaseRenderPassTextures();
103 103
104 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; 104 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE;
105 virtual bool BindFramebufferToTexture(DrawingFrame* frame, 105 virtual bool BindFramebufferToTexture(DrawingFrame* frame,
106 const ScopedResource* resource, 106 const ScopedResource* resource,
107 gfx::Rect framebuffer_rect) OVERRIDE; 107 gfx::Rect target_rect) OVERRIDE;
108 virtual void SetDrawViewportSize(gfx::Size viewport_size) OVERRIDE; 108 virtual void SetDrawViewport(gfx::Rect window_space_viewport) OVERRIDE;
109 virtual void SetScissorTestRect(gfx::Rect scissor_rect) OVERRIDE; 109 virtual void SetScissorTestRect(gfx::Rect scissor_rect) OVERRIDE;
110 virtual void ClearFramebuffer(DrawingFrame* frame) OVERRIDE; 110 virtual void ClearFramebuffer(DrawingFrame* frame) OVERRIDE;
111 virtual void DoDrawQuad(DrawingFrame* frame, const class DrawQuad*) OVERRIDE; 111 virtual void DoDrawQuad(DrawingFrame* frame, const class DrawQuad*) OVERRIDE;
112 virtual void BeginDrawingFrame(DrawingFrame* frame) OVERRIDE; 112 virtual void BeginDrawingFrame(DrawingFrame* frame) OVERRIDE;
113 virtual void FinishDrawingFrame(DrawingFrame* frame) OVERRIDE; 113 virtual void FinishDrawingFrame(DrawingFrame* frame) OVERRIDE;
114 virtual bool FlippedFramebuffer() const OVERRIDE; 114 virtual bool FlippedFramebuffer() const OVERRIDE;
115 virtual void EnsureScissorTestEnabled() OVERRIDE; 115 virtual void EnsureScissorTestEnabled() OVERRIDE;
116 virtual void EnsureScissorTestDisabled() OVERRIDE; 116 virtual void EnsureScissorTestDisabled() OVERRIDE;
117 virtual void CopyCurrentRenderPassToBitmap( 117 virtual void CopyCurrentRenderPassToBitmap(
118 DrawingFrame* frame, 118 DrawingFrame* frame,
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 scoped_ptr<VideoYUVProgram> video_yuv_program_; 392 scoped_ptr<VideoYUVProgram> video_yuv_program_;
393 scoped_ptr<VideoStreamTextureProgram> video_stream_texture_program_; 393 scoped_ptr<VideoStreamTextureProgram> video_stream_texture_program_;
394 394
395 scoped_ptr<VideoYUVProgram> video_yuv_program_highp_; 395 scoped_ptr<VideoYUVProgram> video_yuv_program_highp_;
396 scoped_ptr<VideoStreamTextureProgram> video_stream_texture_program_highp_; 396 scoped_ptr<VideoStreamTextureProgram> video_stream_texture_program_highp_;
397 397
398 scoped_ptr<DebugBorderProgram> debug_border_program_; 398 scoped_ptr<DebugBorderProgram> debug_border_program_;
399 scoped_ptr<SolidColorProgram> solid_color_program_; 399 scoped_ptr<SolidColorProgram> solid_color_program_;
400 scoped_ptr<SolidColorProgramAA> solid_color_program_aa_; 400 scoped_ptr<SolidColorProgramAA> solid_color_program_aa_;
401 401
402 OutputSurface* output_surface_;
403 WebKit::WebGraphicsContext3D* context_; 402 WebKit::WebGraphicsContext3D* context_;
404 403
405 skia::RefPtr<GrContext> gr_context_; 404 skia::RefPtr<GrContext> gr_context_;
406 skia::RefPtr<SkCanvas> sk_canvas_; 405 skia::RefPtr<SkCanvas> sk_canvas_;
407 406
408 gfx::Rect swap_buffer_rect_; 407 gfx::Rect swap_buffer_rect_;
409 gfx::Rect scissor_rect_; 408 gfx::Rect scissor_rect_;
410 bool is_viewport_changed_;
411 bool is_backbuffer_discarded_; 409 bool is_backbuffer_discarded_;
412 bool discard_backbuffer_when_not_visible_; 410 bool discard_backbuffer_when_not_visible_;
413 bool is_using_bind_uniform_; 411 bool is_using_bind_uniform_;
414 bool visible_; 412 bool visible_;
415 bool is_scissor_enabled_; 413 bool is_scissor_enabled_;
416 bool blend_shadow_; 414 bool blend_shadow_;
417 unsigned program_shadow_; 415 unsigned program_shadow_;
418 TexturedQuadDrawCache draw_cache_; 416 TexturedQuadDrawCache draw_cache_;
419 int highp_threshold_min_; 417 int highp_threshold_min_;
420 int highp_threshold_cache_; 418 int highp_threshold_cache_;
421 419
422 struct PendingAsyncReadPixels; 420 struct PendingAsyncReadPixels;
423 ScopedPtrVector<PendingAsyncReadPixels> pending_async_read_pixels_; 421 ScopedPtrVector<PendingAsyncReadPixels> pending_async_read_pixels_;
424 422
425 scoped_ptr<ResourceProvider::ScopedWriteLockGL> current_framebuffer_lock_; 423 scoped_ptr<ResourceProvider::ScopedWriteLockGL> current_framebuffer_lock_;
426 gfx::Size current_framebuffer_size_;
427 424
428 scoped_refptr<ResourceProvider::Fence> last_swap_fence_; 425 scoped_refptr<ResourceProvider::Fence> last_swap_fence_;
429 426
430 SkBitmap on_demand_tile_raster_bitmap_; 427 SkBitmap on_demand_tile_raster_bitmap_;
431 ResourceProvider::ResourceId on_demand_tile_raster_resource_id_; 428 ResourceProvider::ResourceId on_demand_tile_raster_resource_id_;
432 429
433 DISALLOW_COPY_AND_ASSIGN(GLRenderer); 430 DISALLOW_COPY_AND_ASSIGN(GLRenderer);
434 }; 431 };
435 432
436 // Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL 433 // Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL
437 // call made by the compositor. Useful for debugging rendering issues but 434 // call made by the compositor. Useful for debugging rendering issues but
438 // will significantly degrade performance. 435 // will significantly degrade performance.
439 #define DEBUG_GL_CALLS 0 436 #define DEBUG_GL_CALLS 0
440 437
441 #if DEBUG_GL_CALLS && !defined(NDEBUG) 438 #if DEBUG_GL_CALLS && !defined(NDEBUG)
442 #define GLC(context, x) \ 439 #define GLC(context, x) \
443 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) 440 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__))
444 #else 441 #else
445 #define GLC(context, x) (x) 442 #define GLC(context, x) (x)
446 #endif 443 #endif
447 444
448 } // namespace cc 445 } // namespace cc
449 446
450 #endif // CC_OUTPUT_GL_RENDERER_H_ 447 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698