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

Unified Diff: gpu/command_buffer/service/context_state.cc

Issue 2482673002: fix --show-composited-layer-borders on Mac (Closed)
Patch Set: small fix Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/context_state_impl_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/context_state.cc
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc
index 0a3ff51599f30bf41907b27310640ed939bd194a..94192a6129b60afddd03bd3597aa5876f8b62f03 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -230,6 +230,11 @@ ContextState::ContextState(FeatureInfo* feature_info,
ContextState::~ContextState() {
}
+void ContextState::SetLineWidthBounds(GLfloat min, GLfloat max) {
+ line_width_min_ = min;
+ line_width_max_ = max;
+}
+
void ContextState::RestoreTextureUnitBindings(
GLuint unit, const ContextState* prev_state) const {
DCHECK_LT(unit, texture_units.size());
@@ -297,6 +302,11 @@ void ContextState::RestoreUnpackState() const {
}
}
+void ContextState::DoLineWidth(GLfloat width) const {
+ glLineWidth(
+ std::min(std::max(width, line_width_min_), line_width_max_));
+}
+
void ContextState::RestoreBufferBindings() const {
if (vertex_attrib_manager.get()) {
Buffer* element_array_buffer =
« no previous file with comments | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/context_state_impl_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698