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

Side by Side Diff: cc/layers/io_surface_layer_impl.cc

Issue 1387283002: cc: Remove redundant is_overlay arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo changes on overlay_strategy_single_on_top.cc Created 5 years, 2 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 | « no previous file | cc/layers/texture_layer_impl.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 #include "cc/layers/io_surface_layer_impl.h" 5 #include "cc/layers/io_surface_layer_impl.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "cc/output/output_surface.h" 8 #include "cc/output/output_surface.h"
9 #include "cc/quads/io_surface_draw_quad.h" 9 #include "cc/quads/io_surface_draw_quad.h"
10 #include "cc/trees/layer_tree_impl.h" 10 #include "cc/trees/layer_tree_impl.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 gfx::Rect quad_rect(bounds()); 72 gfx::Rect quad_rect(bounds());
73 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); 73 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
74 gfx::Rect visible_quad_rect = 74 gfx::Rect visible_quad_rect =
75 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect( 75 draw_properties().occlusion_in_content_space.GetUnoccludedContentRect(
76 quad_rect); 76 quad_rect);
77 if (visible_quad_rect.IsEmpty()) 77 if (visible_quad_rect.IsEmpty())
78 return; 78 return;
79 79
80 IOSurfaceDrawQuad* quad = 80 IOSurfaceDrawQuad* quad =
81 render_pass->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>(); 81 render_pass->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>();
82 quad->SetNew(shared_quad_state, 82 quad->SetNew(shared_quad_state, quad_rect, opaque_rect, visible_quad_rect,
83 quad_rect, 83 io_surface_size_, io_surface_resource_id_,
84 opaque_rect, 84 IOSurfaceDrawQuad::FLIPPED);
85 visible_quad_rect,
86 io_surface_size_,
87 io_surface_resource_id_,
88 IOSurfaceDrawQuad::FLIPPED,
89 false);
90 ValidateQuadResources(quad); 85 ValidateQuadResources(quad);
91 } 86 }
92 87
93 void IOSurfaceLayerImpl::ReleaseResources() { 88 void IOSurfaceLayerImpl::ReleaseResources() {
94 // We don't have a valid resource ID in the new context; however, 89 // We don't have a valid resource ID in the new context; however,
95 // the IOSurface is still valid. 90 // the IOSurface is still valid.
96 DestroyResource(); 91 DestroyResource();
97 io_surface_changed_ = true; 92 io_surface_changed_ = true;
98 } 93 }
99 94
100 void IOSurfaceLayerImpl::SetIOSurfaceProperties(unsigned io_surface_id, 95 void IOSurfaceLayerImpl::SetIOSurfaceProperties(unsigned io_surface_id,
101 const gfx::Size& size) { 96 const gfx::Size& size) {
102 if (io_surface_id_ != io_surface_id) 97 if (io_surface_id_ != io_surface_id)
103 io_surface_changed_ = true; 98 io_surface_changed_ = true;
104 99
105 io_surface_id_ = io_surface_id; 100 io_surface_id_ = io_surface_id;
106 io_surface_size_ = size; 101 io_surface_size_ = size;
107 } 102 }
108 103
109 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { 104 const char* IOSurfaceLayerImpl::LayerTypeAsString() const {
110 return "cc::IOSurfaceLayerImpl"; 105 return "cc::IOSurfaceLayerImpl";
111 } 106 }
112 107
113 } // namespace cc 108 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698